Pursuant to some archiving projects I want to conduct, I wanted to evaluate Bzip2 vs. LZMA for compression. I know that the latter is more efficient, size-wise, than the former while generally requiring more time on the compression side. But I wanted to know if the encoding time difference was very severe vs. the space saved. I also wanted to know how the relative decode speed compares.
Methodology: For a number of large files that are each around 1.35 GB, measure the compression speed and ratio and then measure…
You know what? This is the most basic type of profiling experiment to set up and I really don’t feel like describing the process, the hardware used, the variables carefully controlled, or graphing the data. Here’s what I came up with in my tests:
- Bzip2 is 2-2.3x faster to compress than LZMA.
- The Bzip2 files were 15-20% larger than the LZMA files.
- The LZMA files decompressed in nearly half the time of the Bzip2 files.
Conclusion: I’ll be going with LZMA for my long-term archival projects.