Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why this wav gets compressed 4x more by 7zip than by WavPack? (question) #189

Closed
geextahslex opened this issue Nov 10, 2024 · 5 comments
Closed

Comments

@geextahslex
Copy link

Hi, I recently noticed that when you compress this wav file with 7zip, it gets much smaller than with WavPack, more than 4x
Can someone explain this behaviour?

Thanks for any help :)

This is the file:
44-AudioTrack-44.zip

og wave: 65,10 MB
WavPack: 39,20 MB
7zip: 8,14 MB

@dbry
Copy link
Owner

dbry commented Nov 11, 2024

There is something artificial about that file that makes it compress much better with general-purpose compressors than with audio compressors. I verified that even my two general-purpose compressors do much better than WavPack!

My first guess was that it simply exactly repeated over each click, which a general-purpose compressor can take advantage of whereas an audio compressors generally would not (because real sampled audio never repeats exactly). But that wasn't it. And looking at the hex data and several other experiments also revealed nothing. I also tried the float32 optimization that I developed a while back (and dropped because it didn't achieve anything will real files in the wild), and got nothing.

So I gave up trying to figure out what specifically is different about this file. But as a final experiment I added -100 dB white noise to the file (which is way below its noise floor) and suddenly WavPack compressed it better than general-purpose compressors. So it is something artificial about the data, I just don't know exactly what.

@geextahslex
Copy link
Author

Wow thats a deep dive, thank you for that info. I was very surprised as I saw that, and thought maybe it's worth to report it.

@H2Swine
Copy link

H2Swine commented Nov 25, 2024

If it is any "comfort", then OptimFROG doesn't leap to well with this one either, it performs kinda in the ballpark you would expect compared to WavPack alone. The heaviest MP4ALS compressions do save another few megabytes, down to 30. Which is just around the level of NTFS "ordinary" compression: 30.8.
compact /c /exe:lzx gets it down to 14. (15 if I split in 1sec chunks.)

@dbry
Copy link
Owner

dbry commented Dec 1, 2024

Alright, I got curious again. The redundancy in this file is that while it purports to be 32-bit float audio, there are only 56814 unique values. The most common value covers over 3% of the samples and half of the samples are covered with only 25 values. So yeah, that’s why it’s super compressible and this is exactly the kind of thing that general-purpose compressors find. And adding just a tiny amount of noise completely destroys that artificial characteristic.

@geextahslex
Copy link
Author

Awesome job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants