Hacker News new | ask | show | jobs
by iruoy 1507 days ago
So bzip2 and bzip3 focus on compressed size, lz4 on compression speed and zstd on decompression speed?
1 comments

I don't know if that's really accurate. LZ4 is often faster on both sides, while usually having a larger compressed size. On most of the inputs listed at this benchmark, LZ4 is twice as fast for compression, 50% faster for decompression, while having a compressed size about 125% as large as Zstd. My rule of thumb is that zstd is good if you're going to store or transmit the result, while lz4 is the better choice if you're planning to compress and decompress exactly once without storing (i.e. as a transfer encoding between two network peers).