WavPack's roundtrip advantage over FLAC

submited by
Style Pass
2024-11-20 12:30:07

This page is about a non-obvious advantage of the audio codec WavPack. I discovered it some years ago when archiving music I’d made with samples as a teenager. (Don’t ask to hear it. It isn’t good.) WavPack has other cool features, like “hybrid mode”, but I won’t cover them here.

Current lossless audio codecs all have a compression ratio of around 50%. Most people seem to use FLAC for lossless audio compression. FLAC is widely supported, including in browsers, and compresses as well as the rest. So why choose WavPack, a less popular alternative? WavPack has an unusual property of always (as far as I can tell) letting you get back a bit-for-bit identical PCM WAV file. This means a WAV file roundtripped through WavPack will have an identical checksums.

This got me interested because in the 2010s I wanted to preserve my old files exactly as they were while saving disk space. I’ll note that now with more abundant disk space this is a less of a concern than it used to be. If you need to get the same exact bits back, you can use a good general-purpose compressor like Zstandard and eat the cost in storage and bandwisth because it’s small. Still, I find the feature interesting, and it might be useful in special cases like archiving a computer game that will be downloaded an installed by many people, which multiplies the bandwidth and the distribution size by the number of users.

Leave a Comment