How MP3s Work Introduction to How MP3s Work
Hey, That's My Seat!
How It's Done
Portable MP3 Players
› Patterns & Redundancies
A "How To" Guide to MP3s
How CD Burners Work
Graph This!
Links

Patterns & Redundancies
Most computer files repeat a lot of information. This is called redundancy. File-compression programs look for patterns and simply get rid of redundancies. Instead of listing a piece of information over and over again, a file-compression program lists that information once and then refers to it whenever it appears in the original program.


As an example, let's look at a type of information we're all familiar with: words. In John F. Kennedy's 1961 inaugural address, he delivered this famous line:

    "Ask not what your country can do for you -- ask what you can do for your country."
The quote has 17 words, made up of 61 letters, 16 spaces, one dash and one period. If each letter, space or punctuation mark takes up one unit of memory, the total file size is 79 units. To reduce the file size, we need to look for redundancies.

Immediately, we notice that:

  • Ask appears two times.
  • What appears two times.
  • Your appears two times.
  • Country appears two times.
  • Can appears two times.
  • Do appears two times.
  • For appears two times.
  • You appears two times.
Roughly half of the phrase is redundant. Nine words -- ask, not, what, your, country, can, do, for, you -- give us almost everything we need for the entire quote. To construct the second half of the phrase, we just point to the words in the first half and fill in the spaces and punctuation. Let's set up a dictionary to make our job easier.
    1. ask 2. what 3. your 4. country 5. can 6. do 7. for 8. you
Our sentence now reads:
    1 not 2 3 4 5 6 7 8 -- 1 2 8 5 6 7 3 4.
If you knew the system, you could easily reconstruct the original phrase using only this dictionary and number pattern. This is what the expansion program does on your computer when it expands a downloaded file.

The Name
MP3 is a strange name! It comes from a group called the Moving Pictures Expert Group (MPEG), which developed compression systems for video data, such as DVD movies and HDTV (high-definition TV) broadcasts. Sound was compressed using a system called "Layer-3." We know it by its abbreviation, MP3.
Our compressed sentence, including spaces, takes up 37 units, and the dictionary (words and numbers) takes up another 37 units.

Our file size has now been reduced a little -- from 79 to 74 units. But, as we apply the program to the rest of Kennedy's speech, the file size is reduced much more; the program finds these words repeated over and over and uses the same dictionary.

This is a good example of how compression works. But MP3 files don't repeat as many patterns as text files. So, this approach is combined with a system that eliminates "unnecessary" bits of information, such as those sounds beyond the range of the human ear. When you are finished creating an MP3 file, you have a "near-CD-quality" song.

<< Prev     Next >>