I've got some 32-bit float WAV files which contain music and some valuable inaudible signal (different in each of the 2 channels) mixed into it which is important to preserve. The nature of the signal is not known to me so I don't really know what parameters can affect it. This is why I need to compress the file such a way decompressing it back would yield a perfectly identical waveform.

From what I know about IEEE floating point numbers these are quirky and you can not expect results of any operation on them to equal anything in particular exactly. The error can be safely ignored in many applications but I doubt I can use them when a perfectly reversible pure function is what I need.

As far as I know FLAC, ALAC and Monkey Audio are limited to 24-bit integers so FLAC/ALAC/APE decoding can hardly yield bit-perfect original when converted back to 32-bit float. Perhaps I'm wrong - I hardly am too much of an expert. WavPack and OptimFrog come to my mind as possible candidates but I'm not sure and need somebody qualified better to confirm (and I would really prefer to avoid OptimFrog because it's closed-source and extremely exotic, nevertheless I'm curious to know if it qualifies).

So what are the codecs and the parameters which could do the job?

Now I just use ZIP but feel interested in considering something more relevant.


http://www.wavpack.com/ has the specs of the supported file formats. Wavpack supports both lossless and lossy compression depending on the configuration options selected during processing.

| improve this answer | |
  • Obviously. And I have mentioned it does support 32-bit float. Yet there is no explicit claim it can perfectly reproduce the original 32-bit float wav file. In fact I have done the conversion and reverse conversion yields a file slightly different in size. – Ivan Jan 24 at 1:06
  • have you tested to see if the file samples are identical? – Mark Jan 24 at 1:19
  • I think if you read the wavpack documentation, they explicitly make the claim that the technology supports lossless encoding/decoding. You might find that the difference in size is only related to header changes rather than actual data samples. Whether you believe that or not is entirely up to you and what you understand by the term lossless. – Mark Jan 24 at 1:38
  • "up to you and what you understand by the term lossless" - that's the point. They say it's lossless an I am asking how exactly lossess it is and specify exactly what kind of lossless I need in this particular case. – Ivan Jan 24 at 2:04
  • Whatever, I've just checked and it turned out the wav file wvunpack yields actually is identical to the original. This seems to be a quirk in how Windows shows file sizes or something - I've observed the size difference (just about a dozen of bytes) on a Windows machine but on a Linux machine the sizes equal, cmp shows no difference and audiodiff says the streams are identical. You can edit your answer to mention this fact and I'll mark it as accepted (as for now it doesn't actually answer the question). – Ivan Jan 24 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.