An Overview of Apple Lossless Compression Results

11/05/2011

I recently pointed out that the Apple Lossless codec has gone open source, meaning that this lossless codec can now be freely used in both hardware and software. The Apple Lossless codec (also known as ALAC) is similar to FLAC, and offers the same advantages. When you compress files in a lossless format, you lose absolutely none of the original data. Just as when you compress a text file using zip compression, decompressing returns all the original letters and characters, lossless music compression provides the full fidelity of the original audio you compressed.

It’s interesting to look at the sizes of files compressed in Apple Lossless format. (These file sizes are similar for other lossless formats, such as FLAC, SHN and APE.) I took a handful of CDs, and ripped some tracks to show how the amount of compression can vary.

When comparing file sizes, the easiest way is to look at the bit rate that displays in iTunes. (Comparing file size is more difficult, as the different files used would have to be the same length for this to be valid.) This is an average bit rate, but it gives an idea as to the amount of compression that was achieved. Different types of music, notably with different instruments, result in compression rates that vary widely. Compare the bit rates below to the bit rate of uncompressed music on a CD, which is 1411 kbps.

Here are some examples:

  • A solo harpsichord work by Johann Sebastian Bach: 902 kbps
  • A solo piano work by Johann Sebastian Bach: 554 kbps
  • A movement of a string quartet by Ludwig van Beethoven: 565 kbps
  • A choral work by Johann Sebastian Bach: 690 kbps
  • A piece for jazz piano trio by the Brad Mehldau Trio: 687 kbps
  • A live recording of a song by the Grateful Dead: 796 kbps
  • An excerpt from Steve Reich’s Music for 18 Musicians: 597 kbps
  • A movement of a symphony by Franz Schubert: 645 kbps
  • A song for male voice and piano by Robert Schumann: 446 kbps

Again, these figures are in no way absolute, and for each piece of music, the resulting level of compression could be different if the tempo, volume or instrumentation varied. But what they do show is that some types of music – notably solo harpsichord, which has a high level of harmonics at high frequencies – compress less well than, say, solo piano or voice and piano. The range of compression for these examples is from 36% to 68%, with the majority of the examples clustering around the 50% level.

Note that I haven’t tested much rock music, and especially not much recently recorded rock or popular music. With many recent recordings having high volume and using compression (not the type that reduces data size, but the kind that reduces the dynamic range of music), file sizes can be much larger. If you listen to recent recordings of such music, you’ve probably noticed that they are often very loud, compared with, say, recordings from a couple of decades ago, and these will result in higher overall bit rates when using lossless compression.