how compression works

In any medium, compression programs try to find extraneous information that can be eliminated, or repetitive information that can be blurred, fudged (that's a technical term), or combined with something else in a way that won't drastically alter the overall file. The methods vary, depending on the media type and the specific compression algorithm.

Image compression generally works by finding similarities within the picture mostly based on color which can be blurred or combined. This is why heavily compressed images appear, well, blurry. The detail has all been sucked out. You can see this in the pictures above: The heavily compressed rhino has lost all its wrinkles; the JPEG compression smoothed right over them.

This is also why cluttered images tend to compress poorly: When there's a lot of unrelated visual content, the compression algorithm has a hard time finding ways to save space. And its efforts to do so are usually clumsy and obvious, leaving the image badly scarred.

Video compression works in a similar way, but it looks for similarities not just within a single frame, but between frames. It also has to consider both audio and visual elements. Since choppy audio is more disruptive to the viewer than choppy images, most codecs will preserve sound quality at the expense of video.

Audio compression looks for patterns as well, but better techniques (like MP3) also try to eliminate sounds we can't hear or won't notice. This reduces the file size without significantly damaging the sound quality.

For example, certain tones are outside the range of human hearing, so those will be removed. And certain sounds we're less likely to hear. For instance, if two sounds play simultaneously, we would normally hear only the louder sound. So audio compression might remove the softer one.



The Unusually Useful Web Book
The Unusually Useful Web Book
ISBN: 0735712069
EAN: 2147483647
Year: 2006
Pages: 195
Authors: June Cohen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net