I want to compress binary data files such as Virtual Machine snapshots. Which archive type would be best for this, where best means smallest output file size? Thanks.

  • .zip is a really good one for all sort of data. – RamonRobben Mar 4 '17 at 23:32

I have made extensive tests with binary NBT (archive) data and all options that 7zip (archive) offers. The best was: *.7z, highest compression, algorythm LZMA2, biggest dictionary size and word size (for big files). That brought 1,5GB of data down to 313MB. But that's probably still not the end, you could have even lower file sizes, but at the cost of time. The compression I used already took 4 4GHz CPU cores 10 minutes to compress this one file, yours will probably be bigger and take even longer. And as compression works, the more rules you implement, the smaller the files get, but the compression also takes exponentially more time and a more complex program.

Usually you don't have to go into extremes with archives and if you don't go into extremes, all the formats are roughly the same, they just have different compatibilities. So .zip is actually one of the best choices, because it works on every operating system I've tried it on so far (Windows, Linux, Android) without additional programs.

| improve this answer | |

The compression ratio of VM snapshot is heavily influenced by the data stored in that VM. Just imagine a VM with a big database of mainly (very well compressible) text a.o.t. a VM with lots of JPEG images.

That being said, bzip2 seems to achieve a good compression ratio on many types of data and is supported on almost any platform in existance. For even broader platform support at the cost of a lesser compression ratio go for zip.

| improve this answer | |

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.