Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Wavpack and MD5 (Read 5019 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wavpack and MD5

Hi guys,

I'd like an explanation about the use of the -m switch in WavPack.

In the documentation it's said:
MD5 sums can also be used by WvUnpack during decompression to verify the data integrity of lossless files.

I created several .wv files without the -m option and corrupted them on purpose with a HEX editor.
When I verified them with WvUnpack I got an error, as I expected, so I don't understand whether I should use the -m option or not for extra peace of mind.

What do you think?

Wavpack and MD5

Reply #1
Does -m have an effect on wvpack.exe?

I suspect -m is just for decoders. (I bet MD5 sums are calculated for all files. It would be up to the decoder (or the user running the decoder) to decide whether to use them.)

Wavpack and MD5

Reply #2
Having an MD5 helps you check the file hasn't been modified from when you've encoded it without being corrupted.
WavPack 5.6.0 -b384hx6cmv / qaac64 2.80 -V 100

Wavpack and MD5

Reply #3
Just to be clear, WavPack does not write an md5 sum by default. I originally put this in for traders who want the md5 sums in there to keep track of their recording versions, and WavPack already has error detection codes to identify corrupt files (and the WavPack codes work with lossy files too, unlike md5).

However, because the md5 sum is performed outside the WavPack library, it is somewhat more robust at finding errors caused by program bugs, algorithm limits or compiler issues. For example, the recent big-endian floating point bug showed up on md5 tests but not with the standard error detection codes. However, for simply detecting corrupt WavPack files, the default internal test is perfectly fine.