Lossless audio

On this page 7

Lossless audio is digital audio stored in a form from which the original PCM samples can be reconstructed exactly, bit for bit. Within audio formats & codecs, the term covers both uncompressed containers such as WAV and AIFF and lossless compression codecs such as FLAC and ALAC, which shrink files without discarding any information.

The opposite category, lossy audio, includes MP3, AAC and Opus, which remove detail judged inaudible by a psychoacoustic model. The key distinction is mathematical rather than perceptual: a lossless file is identical to its source after decoding, while a lossy file is only designed to sound similar.

How lossless audio compression works

Lossless codecs exploit the fact that audio samples are highly predictable from their neighbors. The encoder splits the signal into blocks of a few thousand samples, fits a linear prediction model to each block and stores only the model coefficients plus the residual, the small difference between the prediction and the real sample.

The residual values are mostly small numbers, so they are written with entropy coding, typically Rice or Golomb codes, which assign short codes to frequent small values. Stereo channels are often coded as mid and side signals, because the two channels of most music share much of their content. Decoding simply reverses these steps and arrives at exactly the same integers that entered the encoder.

The stages of a typical encoder are outlined in the following table.

StageWhat it doesEffect on size
FramingSplits audio into blocksAllows local adaptation
Channel decorrelationConverts left/right to mid/sideRemoves shared content
Linear predictionPredicts samples from previous onesLeaves a small residual
Entropy codingCodes residuals with Rice codesPacks small values tightly
ChecksumsStores a hash of the decoded audioDetects corruption
Stages of a typical lossless audio encoder

Because the result depends on how predictable the music is, compression ratios vary widely. Sparse acoustic recordings often shrink to 40 to 50 percent of the uncompressed size, while dense, noisy or heavily limited masters may only reach 60 to 70 percent. White noise cannot be compressed losslessly at all.

Main lossless formats and their properties

Several lossless formats coexist, and the choice is driven mostly by compatibility and metadata support rather than by sound, since all of them decode to the same samples.

FormatCompressionTypical useNotes
WAVNone (PCM)Recording, editing, broadcastLimited metadata, 4 GB limit in classic form
AIFFNone (PCM)Studio work on Apple systemsBig-endian PCM, good metadata
FLACAbout 40-70 percent of originalArchiving, downloads, streamingOpen, royalty free, widely supported
ALACSimilar to FLACApple ecosystem librariesStored in an M4A container
WavPackSimilar to FLACArchivingOptional hybrid lossy mode
Monkey’s Audio (APE)Slightly smaller than FLACEnthusiast archivesHigher decoding load, limited support
Common lossless audio formats

FLAC encoders offer compression levels from 0 to 8. Higher levels spend more time searching for better predictors and produce files only a few percent smaller, while decoding speed stays almost the same. Every level produces identical audio, so the level is purely a trade-off between encoding time and file size.

Lossless versus lossy and high-resolution audio

Lossless describes how faithfully data is stored, not how much data there was to begin with. A lossless file at 16-bit and 44.1 kHz is CD quality; a lossless file at 24-bit and 96 kHz is high-resolution audio. The two properties are independent, and confusing them is one of the most common misunderstandings in consumer audio.

ConceptWhat it guaranteesTypical bitrate for stereo
Uncompressed PCM, 16/44.1Exact samples, no coding1,411 kbps
Lossless, 16/44.1Exact samples after decodingRoughly 600-1,100 kbps
Lossless high-resolution, 24/96Exact samples at higher precisionRoughly 2,000-3,500 kbps
Lossy, transparent settingsSounds the same to most listenersAbout 192-320 kbps
Lossy, low bitrateAcceptable quality, audible artifacts possible64-128 kbps
Lossless compared with neighboring concepts

In controlled blind tests, well-encoded lossy files at high bitrates are often indistinguishable from lossless for most material and listeners. The real advantages of lossless are therefore practical: no generation loss when files are re-encoded or edited, a trustworthy archive, and freedom to convert to any future format without cumulative damage.

Where lossless audio is the right choice

Lossless storage is the default wherever audio will be processed again. Every lossy encode discards information, and repeated lossy encodes stack their artifacts, so production, archiving and distribution masters stay lossless until the final delivery step.

SituationRecommended formatReason
Recording and mixingWAV or AIFF, 24-bitFast editing, maximum headroom
Long-term archiveFLAC with checksumsSmaller files, verifiable integrity
Personal music libraryFLAC or ALACConverts later to any format
Mobile streaming on data limitsAAC or OpusFar smaller files, near-transparent
Bluetooth headphonesLossy codec in the linkThe wireless link re-encodes anyway
Choosing between lossless and lossy delivery

The last row matters in daily use. Most wireless links, including SBC, AAC, aptX and LDAC, re-encode the signal with a lossy codec, so a lossless source does not stay lossless all the way to the ear. The benefit of a lossless file is then limited to avoiding a second layer of lossy coding.

Pitfalls and misconceptions about lossless files

Lossless is only as good as the source that went into it. Converting an MP3 to FLAC does not restore lost detail; it only stores the already damaged signal in a larger file. Spectrum analysis that shows a sharp cutoff near 16 kHz is a typical sign of such a transcoded lossy source.

  • Different file sizes do not mean different sound: two FLAC files at different compression levels decode to identical samples.
  • Sample rate conversion or dither applied during export changes the data, so the result is no longer a lossless copy of the original master.
  • Bit-perfect playback also requires that the operating system mixer does not resample or change volume digitally on the way to the converter.
  • Metadata and tags can differ between copies of the same audio; comparing decoded audio checksums is more reliable than comparing whole files.

The simple explanation

Lossless audio is like packing a suitcase very neatly instead of throwing things away to make it close. Everything you packed comes out again, exactly as it went in.

Lossy formats such as MP3 are more like leaving behind items you probably will not miss. The suitcase is much lighter, and usually you do not notice. Lossless keeps everything, which matters most when the music will be edited, converted or stored for many years.

How it is used in practice

A small independent record label digitizes its back catalog from studio tapes. The transfers are captured as 24-bit, 96 kHz WAV files, then archived as FLAC at compression level 8, which reduces the storage needed to roughly 55 to 65 percent of the original while embedding checksums for every file.

When a streaming service later requests delivery, the label converts the archive to the required CD-quality masters with proper dither, and also produces AAC files for a download store. Because every derivative starts from the lossless archive, no format inherits artifacts from another, and a periodic integrity check confirms that no file has silently degraded on the storage drives.