Lossy & Lossless Compression

Lossy Audio Compression

Unlike the lossless method, lossy audio compression does not compress the entire audio file. Instead, the lossy method uses several psychoacoustic methods to analyze the audio information present in a given audio file and "throw away" information which seems unnecessary - information that humans are unable to discern. This "unnecessary" information has been deduced by extensive testing of the human hearing capacity and then implemented - in different ways by the different lossy audio compression formats - to achieve a "utopian" compromise of quality versus size. Think of lossy audio compression as a method of "weeding out" the unnecessary information stored in an audio file and only keeping the information applicable to the human hearing ability.

The universal goal of lossy audio compression is to minimize the necessary information while still maintaining the same "perceptual" audio quality. Some formats limit their implementation to only CD quality audio (Musepack) while others are tuned to optimally encode any format of audio desired (psytel AAC).

Similar to the various programs that use lossless audio compression techniques, there are many formats which utilize lossy audio compression. Popularity of this method is held by the "omnipotent" MP3. It is by the huge public unveiling of this format (think Napster) that MP3 is known and/or used by the majority of computer users. Unfortunately, most people have absolutely no idea that there exists other lossy audio compression formats - some of which are far superior to MP3.

In contrast to MP3, the popularity of other lossy audio compression formats (such as Musepack, OGG Vorbis, or advanced audio coding is infinitesimally benign) none of these formats can create a userbase as vast as that of MP3...

Lossless Compression

Lossless audio compression utilizes various compression algorithms (varying between different formats) to minimize the required information contained in an audio file while maintaining the integrity of the source. This means that the compressed file may be decompressed in the future and output the same source file as before - being in every way identical. This method of compression can currently decrease an uncompressed wave to a ~60% maximum (a ratio of 3:5) and on average can achieve ~50% compression (a ratio of 1:2).

The idea of lossless audio compression is analogous to using Winzip to compress a document or program. However, because Winzip was not designed to compress audio information, alternatives to Winzip are available which are specifically designed for this function.

There are a many different formats available for lossless audio compression - with each boasting a particular aspect that allows it to stand out above the rest. However, no individual program holds a "de facto standard" it seems clear, though, that the variables that will inevitably choose this "de facto" standardized format can be broken down into a few topics: accessibility (availability to the masses), portability (supporting various computer architectures, such as Linux, Mac OS, Windows, etc.), compression (decreasing file size), speed performance (time lapse of compression and decompression), documentation (the availability of the used technology, to be supported by 3rd parties and to ensure future support), and stability (the maturity of the software). Currently, no lossless format stands out in regards to the culmination of all of these aspects. Truthfully, Shorten may be the most popular (most notably among the bootleg trading community), Monkey's Audio results are the best in compression, and Wavepack results are the best in speed performance... But these programs will, by no means, take hold of the ever-elusive popularity among the lossless audio compression "field" in their current states. The "burden" of choosing a "de facto" format now leaves other variables much more prominent in the decision-making process. As of now, in regards to all of these variables, FLAC is clearly the choice format for universal use.

Distinctions between Lossy and Lossless Compression

As with other specific forms of data compression, there exist many "lossless" and "lossy" algorithms to achieve the compression effect. These are two general types of digital compression.

Type of Compression Advantages Disadvantages
Lossless Encoding (Monkey's Audio, FLAC) Corresponds 100% to the original file (helpful for archiving purposes)File size reduction only to about 25% (for piano music) and 70% (for rock music)
Gapless
Fully taggable with track infos and cover
Conversion in any other format possible without loss of audio information
Lossy Encoding (MP3, OGG Vorbis, AAC)Fully taggable with track infos and coverDoes not contain all of the original audio information (but the remainder may not be audible)
File size reduction to 4-22% of original sizeMP3 not gapless (short pause between tracks especially annoying with live tracks); OGG Vorbis, however, is said to be gapless
Conversion into any other format only with loss of audio information

The following image shows the difference between lossy and lossless compression.

We took a clip from the Fellowship of the Ring soundtrack and encoded it in two formats: Windows Media 9 Lossless and MP3 at 128 kilobits per second. The original clip was 10.3 MB, which was cut down to 6 MB with the lossless codec - not even a 2:1 reduction, but still a good space savings. A clip that is not quite so musically complex would compress further. The 128 kbit MP3 cut the file down to 983 kilobytes, and 11:1 compression ratio.

Then we took a look at a spectrum analysis of the resulting files. Note how lossless compression produces the exact same graph, while the MP3 file loses signal dramatically as frequency increases and drops off entirely just over 16 KHz. Increasing the bit rate can improve this, but the only way to get a totally exact copy of the music is to use a lossless compression scheme.

Related Links