220 likes | 235 Views
File Compression and Formats. HTML isn’t all… Prof. Sheizaf Rafaeli E-Commerce. It’s about bandwidth It’s about time / quality tradeoff It’s about multimedia It’s about intellectual property. See: “Multimedia File Formats on the Internet”, at: http://128.151.244.128/multimed/contents.htm
E N D
File Compression and Formats HTML isn’t all… Prof. Sheizaf Rafaeli E-Commerce Prof. Sheizaf Rafaeli
It’s about bandwidthIt’s about time / quality tradeoffIt’s about multimediaIt’s about intellectual property • See: “Multimedia File Formats on the Internet”, at: http://128.151.244.128/multimed/contents.htm • See “The Bandwidth Conservation Society”, at: http://www.infohiway.com/faster/index.html Prof. Sheizaf Rafaeli
File formats • Over 5000 types • Content: text, data (spreadsheet, database, ppt), graphics, audio, video • Executable programs (client, server sides) • Formulae: MIDI, 3D, VRML • How important are file formats for establishing business clout? Prof. Sheizaf Rafaeli
File Format Considerations • Considerations: Compression, Efficiency (of compression and decode), Quality, Variety, Resolution, Color, Depth, Transportability, Scalability,Standardization, Encryption Prof. Sheizaf Rafaeli
File types on the web: plugins Source: StatMarket, January 2001 Prof. Sheizaf Rafaeli
Compression Prof. Sheizaf Rafaeli
Compression • There are various compression methods. • Some searching for and replace characters with codes. e.g. strings of blanks can be replaced with a code that represents them. • Some replace long sequences of repeating characters with one occurance of the character and a number. • Some compression programs create a dictionary Prof. Sheizaf Rafaeli
Compression • UNCOMPRESSED:How much wood could a woodchuck chuck if a woodchuck could chuck wood. • COMPRESSED:How much 1 2 a 1 3 3 if a 1 3 2 3 1. 1=wood 2=could 3=chuck Prof. Sheizaf Rafaeli
Compression utilities • WinZip • StuffIt • Zip, .ZOO, ARJ, ARC, .Z, LHA, HQX,TAR, BinHex, Base64,Uuencode, many more Prof. Sheizaf Rafaeli
Graphic file formats • BMP • WMF, PCX • TIFF, GIF, JPG, PNG • Which is appropriate for web? Bandwidth, “lossy”, rendering fonts, scalability, economically viable? • Which is more “accurate”? • Which is really necessary? Prof. Sheizaf Rafaeli
GIF (Graphical Interchange Format) Smaller file sizes for graphic images with large areas of solid colors and uncomplicated backgrounds Supports transparency, interlacing, animation “Owned” by Compuserve JPEG (Joint Photographic Experts Group) smaller file sizes for images that have gradual transitions or many fine details such as photographs GIF vs. JPG Prof. Sheizaf Rafaeli
GIFs are lossless but may not be as effificent • Graphics with repeating horizontal elements compress better than graphics with repeating vertical elements in the GIF format.200 bytes or so 600 bytes or so Prof. Sheizaf Rafaeli
Compressing images Run-length encoding compresses images without losing information. Prof. Sheizaf Rafaeli
A leading lossless compression scheme is LZW (Lempel-Ziv-Welch). LZW is used in GIF files, and achieves compression ratios of 50 to 90% Lossy compression does not uncompress to the same quality. The leading lossy compression schemes are JPEG and MP3. Compression ratios between 10:1 and 40:1 are common. Lossy vs. Lossless Prof. Sheizaf Rafaeli
Lossy compression Lossy compression reduces the data density, and is not likely to be noticed by the human eye. But if an image is made too large after compression, the image looks rough. see at: http://www.umich.edu/~cisdept/mba/CIS745/balloon.animation.gif Prof. Sheizaf Rafaeli
Lossy compression Prof. Sheizaf Rafaeli
Animation compression SHIFT the existing pixels or DESCRIBE only the NEW PIXELS from one frame to another see at: http://www.umich.edu/~cisdept/mba/CIS745/beach-ball.animation.gif Prof. Sheizaf Rafaeli
Text format files • ASCII .TXT, Microsoft’s .DOC, Wordperfect’s .WP , UNICODE... • Rich Text Format (RTF), Postscript, Adobe’s PDF Prof. Sheizaf Rafaeli
MIDI .WAV, .AU, AIFF Real Audio (streaming) MP3PLJ Audio formats Prof. Sheizaf Rafaeli
Video formats • Sample size, sample rate • Frames per second • .asf .rm .ra .avi .mpg .qt .vdo .viv .mpeg Prof. Sheizaf Rafaeli
Video formats:MPEG MPEG (pronounced EHM-pehg), the Moving Picture Experts Group, develops standards for digital video and digital audiocompression. Prof. Sheizaf Rafaeli
http://www.ora.com/centers/gff//gff-faq/gff-faq1.htm: Graphic File Formats FAQ • http://www.faqs.org/faqs/jpeg-faq and http://www.faqs.org/faqs/compression-faq/part1/preamble.html : Image compression FAQs • http://www.mpeg.org/MPEG/ : MPEG Pointers and Resources • http://whatis.com/ff.htmEvery File Format in the World • http://www.matisse.net/files/formats.htmlCommon Internet File Formats Prof. Sheizaf Rafaeli