The ABCs of Lossless Music Files

Lots of people like to use lossless digital music files. These are files that reproduce exactly what is on a CD, with no loss in quality; they can even go further, offering high-resolution capabilities, with bit depths and sample rates well above that of CD.

One of the advantages of lossless files is that, when decompressed, they are bit-perfect replicas of your CDs (or digital downloads). When you rip a CD to a lossless format, then play it back, iTunes, or other software, converts the file to the exact same digital stream as was on the original CD.

This can be confusing. In a recent Ask the iTunes Guy column on Macworld, I addressed a question about that. A reader had written in:

“I read your column regularly, and really appreciated your recent explanation of AIFF, WAV, and Apple Lossless formats. But I don’t get it; how can the file size of Apple Lossless be half that of AIFF without some voodoo going on?”

My reply was:

“I received this email with the subject: Apple Lossless, Magic?. And I can understand that it can seem like there’s some voodoo in this process, but it’s actually pretty simple. (At least the concept is simple; the math behind it is a bit above my pay grade.)

“Imagine that you have a text file with, say, the complete works of William Shakespeare. This text file contains 908,774 words, and takes up 5.6 MB on disk. If I compress the file using OS X’s built-in Zip compression, the same file takes up just over 2 MB, or about 36 percent of the original file size.

“Lossless compression for audio works in a similar way. Unlike, say, AAC or MP3 files–where psychoacoustic models are used to determine which parts of the audio can be removed without affecting what you hear–lossless compression formats simply compress all of the data in a file. When played back, these files are decompressed on the fly, so the compressed data becomes audio data again, in a bit-perfect equivalent to the original. Nothing is lost, just as none of Shakespeare’s words are lost when I decompress the zipped file.”

But there’s another thing you should know about lossless files. You can convert from one lossless format to another, back and forth, without losing any data. (This, of course, assumes that you have no hard disk glitches or the like.) So, when a reader wrote me today asking some questions about AIFF files, I asked why he didn’t use Apple Lossless? He can save half the space with the same quality.

Here’s an overview of lossless audio file formats:

  • AIFF: These are files that take raw PCM (pulse-code modulation) data from a CD and wrap it in a header so it can be used on a computer. AIFF files are commonly used on Macs.
  • WAV: These are similar to AIFF files, but more commonly used on PCs.
  • Apple Lossless: This is a format that Apple created, then later released as open source, which compresses losslessly, so the resulting files take up roughly half the space of the original AIFF or WAV files.
  • FLAC: These are files in the Free Lossless Audio Codec format. iTunes does not support FLAC and probably never will.

(Note that the above are the main lossless audio formats, the ones you’ll encounter frequently. There are a few others that are not broadly supported: Monkey’s Audio (.ape), WavPack (.wv), Windows Media Audio Lossless (.wma), Shorten (.shn), etc. One could also add DSD – Direct-Stream Digital – files to the list; these are very-high-resolution files used to make super audio CDs (SACD). These are starting to be sold as digital files.)

You can rip CDs in iTunes in AIFF, WAV or Apple Lossless. You can buy music by download in FLAC and Apple Lossless, with some sites also selling AIFF and WAV files.

It’s important to note that, if you use iTunes, WAV files are problematic, since they don’t support tags or album art very well. AIFF files do, as long as you keep them in your iTunes library. When you move them, some of the metadata is lost. If you want to use lossless files with iTunes, Apple Lossless is the way to go.

But, since you can convert these files easily, and for the best metadata support, I recommend that you use Apple Lossless files. Use the free XLD, or X Lossless Decoder, to convert from one lossless format to another.

If you want to keep a library of lossless music, save the space; don’t use AIFF or WAV, because there is no difference in the audio quality (despite what some audiophiles claim). But given the low cost of storage space these days, there’s no reason any more to not rip CDs in lossless formats. They offer the same quality as CDs, and they’re flexible: you can convert them to lossy formats at any time, retaining the higher-quality originals. And iTunes can even convert them on the fly when you sync an iOS device, so you don’t overload that iPhone or iPad.

44 thoughts on “The ABCs of Lossless Music Files

  1. This isn’t exactly true. ZIP compression works differently than the kind of audio compression mentioned here. If I take an uncompressed audio file, and compress it using ZIP, the file will be smaller, and there is not loss of data. Not exactly the same with so called “lossless” compression. Something IS missing… you may not hear it, I may not hear it, but it is NOT the same. In the example cited, if your took Mr. Shakespears’ works, and took out all the periods….who needs those anyway… you are saving file space and making the file smaller…that’s the kind of “lossless” audio compression the author is talking about… which isn’t the same as zipping up the file to make it smaller. One, all the periods are missing… and the other, all the periods are there…. Both give you smaller file sizes… but they are not the same. This statement “One of the advantages of lossless files is that they are bit-perfect replicas of your CDs” is particularly misleading. Lossless files are NOT bit-perfect replicas of CD’s.

    • You’re kidding, right? If you don’t believe that lossless audio compression results in exactly the same data when a music file is played back, try asking Mr. Google.

      • I can’t believe that this guy doesn’t seem to get a grasp at the concept of the format.
        I guess it’s a abstract problem. I always told people the same analogy wit the zip file, but it seems some people are not always computer-savvy.
        Therefore i think the loseless analogy in real life would be a newspaper.

        It’s folded (compressed) so you can pick it up and put it under your arm or tuck it away in your bag. You can’t read the articles in it unless you unfold the whole thing. (It’s uncompressed). You do this just so long you read the paper and fold it again when you’re done. It’s compressed again but the whole information is still there.

        Whereas an compressed format like MP3 is like an abstract or a summary of a book or a film in said newspaper.

        (Sorry, my english isn’t the best so i can’t express the thing i have in mind as thorough as it probably should…)

    • Of course they’re not “bit-perfect replicas” of CDs as encoded – for the same reason the zipped Shakespeare is not identical to the uncompressed text.

      The decompressed file will be bit-perfect, by definition, as Mr. McElhearn says.

      That’s what “lossless” means.

      (See also here, from 2006.

      “This Wave file was converted using dBpowerAMP into a FLAC file […] and the original Wave file was deleted. The FLAC file was converted into a Monkey’s Audio file, which was converted into an OptimFROG file, which was converted into a Shorten file, which was converted into a WavPack file. Finally, the WavPack file was converted into an uncompressed Wave file.

      The resulting Wave file was exactly the same size as the original Wave file, and the MD5, SHA1 and CRC-32 hash values matched exactly with the original. ”

      If you want to tell me there was bit-level differences but purely by coincidence the size and all three different hashes were identical, well, I’m not going to buy it, as a programmer.)

      • Wrong.

        If I take a lossless file from a CD, I can play it back in iTunes. Sounds great. If I take that same file and compress it to any format… mp3, ACC, Apple Lossless… I can still play it back in iTunes and will most likely sound just fine. It IS compressed… data IS missing, so it can’t possible be a “bit perfect” replica of the original.

        If I take Mr. Shakespear’s work, and zip that file up….”compressing it”…. it’s IMPOSSIBLE to read in that state. It must be uncompressed to read, and when it is uncompressed, it is indeed a bit perfect replica of the original file.

        If I take a 5MB jpeg file, it’ll look GREAT. And if I decide to compress it to make it smaller… I can create a smaller jpeg file, and it too will look pretty good… probably good enough so that most people wouldn’t even notice the difference… but the smaller file is NOT a bit perfect replica of the original.

        You are talking about apples and oranges here…. regardless of what Google says.

    • Lossy audio formats are lossless, the reason for the difference to zip compression is that an audio lossless format can take advantage of features particular to audio to reduce the amount of space needed, for example it can use an 8bit number to recorded the difference from one sample to the next and have an mechanism to use addition 8bit number when a single 8bit number is not big enough to represent the difference.

  2. This isn’t exactly true. ZIP compression works differently than the kind of audio compression mentioned here. If I take an uncompressed audio file, and compress it using ZIP, the file will be smaller, and there is not loss of data. Not exactly the same with so called “lossless” compression. Something IS missing… you may not hear it, I may not hear it, but it is NOT the same. In the example cited, if your took Mr. Shakespears’ works, and took out all the periods….who needs those anyway… you are saving file space and making the file smaller…that’s the kind of “lossless” audio compression the author is talking about… which isn’t the same as zipping up the file to make it smaller. One, all the periods are missing… and the other, all the periods are there…. Both give you smaller file sizes… but they are not the same. This statement “One of the advantages of lossless files is that they are bit-perfect replicas of your CDs” is particularly misleading. Lossless files are NOT bit-perfect replicas of CD’s.

    • You’re kidding, right? If you don’t believe that lossless audio compression results in exactly the same data when a music file is played back, try asking Mr. Google.

      • I can’t believe that this guy doesn’t seem to get a grasp at the concept of the format.
        I guess it’s a abstract problem. I always told people the same analogy wit the zip file, but it seems some people are not always computer-savvy.
        Therefore i think the loseless analogy in real life would be a newspaper.

        It’s folded (compressed) so you can pick it up and put it under your arm or tuck it away in your bag. You can’t read the articles in it unless you unfold the whole thing. (It’s uncompressed). You do this just so long you read the paper and fold it again when you’re done. It’s compressed again but the whole information is still there.

        Whereas an compressed format like MP3 is like an abstract or a summary of a book or a film in said newspaper.

        (Sorry, my english isn’t the best so i can’t express the thing i have in mind as thorough as it probably should…)

    • Of course they’re not “bit-perfect replicas” of CDs as encoded – for the same reason the zipped Shakespeare is not identical to the uncompressed text.

      The decompressed file will be bit-perfect, by definition, as Mr. McElhearn says.

      That’s what “lossless” means.

      (See also here, from 2006.

      “This Wave file was converted using dBpowerAMP into a FLAC file […] and the original Wave file was deleted. The FLAC file was converted into a Monkey’s Audio file, which was converted into an OptimFROG file, which was converted into a Shorten file, which was converted into a WavPack file. Finally, the WavPack file was converted into an uncompressed Wave file.

      The resulting Wave file was exactly the same size as the original Wave file, and the MD5, SHA1 and CRC-32 hash values matched exactly with the original. ”

      If you want to tell me there was bit-level differences but purely by coincidence the size and all three different hashes were identical, well, I’m not going to buy it, as a programmer.)

      • Wrong.

        If I take a lossless file from a CD, I can play it back in iTunes. Sounds great. If I take that same file and compress it to any format… mp3, ACC, Apple Lossless… I can still play it back in iTunes and will most likely sound just fine. It IS compressed… data IS missing, so it can’t possible be a “bit perfect” replica of the original.

        If I take Mr. Shakespear’s work, and zip that file up….”compressing it”…. it’s IMPOSSIBLE to read in that state. It must be uncompressed to read, and when it is uncompressed, it is indeed a bit perfect replica of the original file.

        If I take a 5MB jpeg file, it’ll look GREAT. And if I decide to compress it to make it smaller… I can create a smaller jpeg file, and it too will look pretty good… probably good enough so that most people wouldn’t even notice the difference… but the smaller file is NOT a bit perfect replica of the original.

        You are talking about apples and oranges here…. regardless of what Google says.

    • Lossy audio formats are lossless, the reason for the difference to zip compression is that an audio lossless format can take advantage of features particular to audio to reduce the amount of space needed, for example it can use an 8bit number to recorded the difference from one sample to the next and have an mechanism to use addition 8bit number when a single 8bit number is not big enough to represent the difference.

  3. “Monkey’s Audio (.ape)”

    This is moderately funny because monkeys may be primates but they’re certainly not apes.

  4. “Monkey’s Audio (.ape)”

    This is moderately funny because monkeys may be primates but they’re certainly not apes.

  5. In thinking about your many excellent observations in the never ending war over lossless vs. lossy audio tracks vs. the expectations and imputed auditory abilities of audiophiles. I cannot think of another somewhat technical community that engages in so much magical thinking. Even the prideful discernment of “foodies” pale in comparison to those who would have themselves hearing differences in audio fidelity based on interconnect cables and so forth. It’s always fun to get people who have paid wads of cash all riled up over the possibility that they might have been little bit (or a lot) oversold.

  6. In thinking about your many excellent observations in the never ending war over lossless vs. lossy audio tracks vs. the expectations and imputed auditory abilities of audiophiles. I cannot think of another somewhat technical community that engages in so much magical thinking. Even the prideful discernment of “foodies” pale in comparison to those who would have themselves hearing differences in audio fidelity based on interconnect cables and so forth. It’s always fun to get people who have paid wads of cash all riled up over the possibility that they might have been little bit (or a lot) oversold.

  7. I have long wondered about this and still don’t understand. I understand compressing text. You look for common strings, like “Hark!” (we’re talking about shakespeare), and replace each Hark! with H!, and you’ve saved 3/5 of the space. But you can’t simply substitute symbols for strings in audio. So I still don’t know how or why it works, althought I belive it does and have been using Apple Lossless for years.

    • Well, it’s not taking the word “Hark!,” it’s actually taking a binary representation of that word. So there’s a lot more redundancy than you might imagine. I Googled it, and didn’t find anything really simple, but on an absolute level, it is, in a way, looking for, say, every occurrence of “the,” assigning a value to it, then replacing the word with the value. But as I said in the article, the math is way above my pay grade.

      Just remember that lossless audio compression is exactly like file compression; there are no psychoacoustic models, and every bit of data has to be retained, just like every word in the Shakespeare corpus.

      • How about take a WAV file convert it into an Apple Lossless file format, the convert it to Flac format, than to WAV. Match the original WAV with the last WAV. That should prove if the Apple Lossless didnt lose anything.

  8. I have long wondered about this and still don’t understand. I understand compressing text. You look for common strings, like “Hark!” (we’re talking about shakespeare), and replace each Hark! with H!, and you’ve saved 3/5 of the space. But you can’t simply substitute symbols for strings in audio. So I still don’t know how or why it works, althought I belive it does and have been using Apple Lossless for years.

    • Well, it’s not taking the word “Hark!,” it’s actually taking a binary representation of that word. So there’s a lot more redundancy than you might imagine. I Googled it, and didn’t find anything really simple, but on an absolute level, it is, in a way, looking for, say, every occurrence of “the,” assigning a value to it, then replacing the word with the value. But as I said in the article, the math is way above my pay grade.

      Just remember that lossless audio compression is exactly like file compression; there are no psychoacoustic models, and every bit of data has to be retained, just like every word in the Shakespeare corpus.

      • How about take a WAV file convert it into an Apple Lossless file format, the convert it to Flac format, than to WAV. Match the original WAV with the last WAV. That should prove if the Apple Lossless didnt lose anything.

  9. Ok guys, don’t get too technical on me. I usually rip my CDS using RealPlayer (the free version) to my computer and transfer to my Samsung note 3. Yesterday I downloaded the Neutron app to my phone and my music went a whole other level. Is there a lossless rip program for my computer that would kick it up another notch?

  10. Ok guys, don’t get too technical on me. I usually rip my CDS using RealPlayer (the free version) to my computer and transfer to my Samsung note 3. Yesterday I downloaded the Neutron app to my phone and my music went a whole other level. Is there a lossless rip program for my computer that would kick it up another notch?

  11. The real problem here is people thinking analogue in a digital world. Any lossless format means that enough data has been sampled to perfectly recreate the original wave form. So some formats are just more efficient at sampling, yet have enough data to perfectly recreate the waveform. Take a cd wave file that is essentially an uncompressed digital file. You can compress it losslessly in any number of ways, Flac, Wma lossless, Apple lossless, it doesn’t matter. Mathematical analysis simply removes redundant pieces if information. Lossy encoding looses some of the original data so the recreated waveform is different…supposedly with psychacoustic analysis so you can’t really tell the difference. The problem with that is it’s someone else’s version of what they think you can hear or not hear for the sake of a smaller file and I’d like to have that discerning process intact so I always buy my music lossless if I can.
    I say, keep it lossless because when the losslymp3 becomes the standard, we’re not getting all the music. If you’ve got a high end system, you want lossless files to play.

  12. The real problem here is people thinking analogue in a digital world. Any lossless format means that enough data has been sampled to perfectly recreate the original wave form. So some formats are just more efficient at sampling, yet have enough data to perfectly recreate the waveform. Take a cd wave file that is essentially an uncompressed digital file. You can compress it losslessly in any number of ways, Flac, Wma lossless, Apple lossless, it doesn’t matter. Mathematical analysis simply removes redundant pieces if information. Lossy encoding looses some of the original data so the recreated waveform is different…supposedly with psychacoustic analysis so you can’t really tell the difference. The problem with that is it’s someone else’s version of what they think you can hear or not hear for the sake of a smaller file and I’d like to have that discerning process intact so I always buy my music lossless if I can.
    I say, keep it lossless because when the losslymp3 becomes the standard, we’re not getting all the music. If you’ve got a high end system, you want lossless files to play.

  13. Kirk,

    AppleCare helped me change settings on my MacBook Pro so that I can rip my CDs in Apple Lossless format. They told me I couldn’t convert the CDs I’d already ripped onto my hard drive into Apple Lossless.

    Tonight I tried to e-mail a PFunk version of “Sunshine of Your Love” featuring DeWayne “Blackbird” McKnight to a friend. Now that my settings are for Lossless, I can’t convert my music to smaller MP3 versions that fit in e-mail. The 11.6 MB un-Lossless version converts now to a 35.8 MB Lossless version — 3 times the size.

    So my questions are:

    (1) what applications will compress my CDs now converted to lossless format into smaller size files, as your article seems to suggest; or,

    (2) does the represented size of the Lossless file (shown when you click on Command + I to get the metadata) not reflect the compressed size of the lossless file; or,

    (3) have I hopelessly misunderstood everything; and,

    (4) isn’t it weird the AppleCare staff seem to believe that you cannot convert commercial CD’s I’ve ripped onto my laptop hard drive; when that’s a menu choice when you right click on an iTunes track?

    Hoping you can help me get a better grasp of what I should be doing to appreciate and use Apple Lossless software.

    Robert Robinson
    Washington, DC
    robrobin@me.com

    • I use XLD to convert audio files, but, as you mention, you can also do it in iTunes.

      The size you see when you press Command-I is the actual size of the file on disc.

      As for AppleCare, there are a lot of things they either don’t know, or are told to not say.

    • There is no benefit to converting already ripped lossy files into a lossless format. The damage is already done. If you want to hear lossless tracks, you need to re-rip from your original CDs.

  14. Kirk,

    AppleCare helped me change settings on my MacBook Pro so that I can rip my CDs in Apple Lossless format. They told me I couldn’t convert the CDs I’d already ripped onto my hard drive into Apple Lossless.

    Tonight I tried to e-mail a PFunk version of “Sunshine of Your Love” featuring DeWayne “Blackbird” McKnight to a friend. Now that my settings are for Lossless, I can’t convert my music to smaller MP3 versions that fit in e-mail. The 11.6 MB un-Lossless version converts now to a 35.8 MB Lossless version — 3 times the size.

    So my questions are:

    (1) what applications will compress my CDs now converted to lossless format into smaller size files, as your article seems to suggest; or,

    (2) does the represented size of the Lossless file (shown when you click on Command + I to get the metadata) not reflect the compressed size of the lossless file; or,

    (3) have I hopelessly misunderstood everything; and,

    (4) isn’t it weird the AppleCare staff seem to believe that you cannot convert commercial CD’s I’ve ripped onto my laptop hard drive; when that’s a menu choice when you right click on an iTunes track?

    Hoping you can help me get a better grasp of what I should be doing to appreciate and use Apple Lossless software.

    Robert Robinson
    Washington, DC
    robrobin@me.com

    • I use XLD to convert audio files, but, as you mention, you can also do it in iTunes.

      The size you see when you press Command-I is the actual size of the file on disc.

      As for AppleCare, there are a lot of things they either don’t know, or are told to not say.

    • There is no benefit to converting already ripped lossy files into a lossless format. The damage is already done. If you want to hear lossless tracks, you need to re-rip from your original CDs.

  15. I don’t know about lossless files before, but I interested with this topics. I have many CDs, and someone there’s know how to rip my CDs to lossless files?

  16. I don’t know about lossless files before, but I interested with this topics. I have many CDs, and someone there’s know how to rip my CDs to lossless files?

  17. I guess calling this article the ‘ABC’s’ of Lossless music was very fitting, good try, lol, I guess..

    Then again i guess, if we get all the apple fans to use the Apple Lossless format, then at least some of the music in the world will be Lossless. ^_-

  18. I guess calling this article the ‘ABC’s’ of Lossless music was very fitting, good try, lol, I guess..

    Then again i guess, if we get all the apple fans to use the Apple Lossless format, then at least some of the music in the world will be Lossless. ^_-

Leave a Reply to robrobin@me.com Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.