| Icecast Installation and Management: A Guide to Open Source Audio Streaming | ||
|---|---|---|
| <<< Previous | Audio Fundamentals | Next >>> |
Compression formats, whether they deal with audio, video, images, or data files, are either lossless or lossy. Lossless formats are identical to the original after being decompressed, while lossy formats are not. As mentioned earlier, one example of lossless compression is the zip archiving scheme. Not a single byte of data can afford to be lost after uncompressing a data file. Zipping or compressing data must therefore be "lossless," otherwise the purpose of compressing or storing data in an archival format is moot.
Some data types can afford to have information discarded based on the premise that you will either not notice it is missing, or that you are willing to compromise on the quality, i.e. have smaller files in exchange for missing but unimportant data.
One example of "lossy" compression is JPEG imaging, which assumes image files store more information than is necessary to display an image of acceptable quality. By discarding some of the information, and by encoding redundant information with mathematical algorithms, excellent compression ratios are achieved for images that do not need to be displayed at high resolutions. All MP3 files, no matter how well-encoded, have discarded some of the information stored in the original, uncompressed signal.
Many lossy compression formats work by scanning for redundant data and reducing it to a mathematical depiction which can be "unpacked" later. A basic picture, for example, composed of just a few colors, if saved in lossless format would be equivalent to storing thousands of identical pixels. The end result is a large file of redundant data.
A photographic compression method such as GIF reduces this redundant information to a single description; a mathematical equivalent of "repeat pixel A an x number of times." When a particular pixel is encountered, it is analyzed for redundancy and reductions in complexity of like-pixels are made to the image. Simple images can be stored as small files, while complex images contain less redundancy and do not compress as well. Complex pictures, in other words, usually require more storage space and are larger in size.
JPEG compression, however, is lossy in nature and works in accord with user-defined "tolerance thresholds"; determining how similar two adjacent pixels (or, in our case, frequencies) have to be before they are considered redundant with one another is the key to determining the degree of lossiness. If JPEG compression is set high, light blue and medium blue pixels are considered redundant. If JPEG compression is set low, the codec will be more discerning about determining which pixels are redundant. The end result will be a clearer picture and a larger image file.
| <<< Previous | Home | Next >>> |
| Audio Fundamentals | Up | Masking Effects |