- If you think that data compression is painfully slow, then check LZ4 (fast) implementation, which is able to compress a text file at ~320 Mb/sec – compression at such speed should be not noticeable for most of applications. It makes sense to increase the LZ4 compression buffer size up to its 32M limit if possible (keep in mind that you will need a similarly sized buffer for uncompression). You can also try chaining 2
LZ4BlockOutputStream
-s with 32M buffer size to get most out of LZ4. - If you are restricted from using 3rd party libraries or want a little bit better compression, check JDK deflate (lvl=1) codec – it was able to compress the same file at ~75 Mb/sec.
Read full article from Performance of various general compression algorithms - some of them are unbelievably fast! - Java Performance Tuning Guide
No comments:
Post a Comment