几款主流的压缩算法对比Zlib,snappy,lz4
TODO ....
https://github.com/Cyan4973/lz4
http://cyan4973.github.io/lz4/
https://github.com/jpountz/lz4-java
https://github.com/martinkallman/performance-as3
========quicklz 1.5 level=1=============
压缩次数:999999
压缩前801.0bytes
压缩后556.0bytes
压缩比69.4%
message interval=135611.11 ms
========quicklz 1.5 level=1=============
压缩次数:9999
压缩前119514.0bytes
压缩后16574.0bytes
压缩比13.8%
message interval=3608.7905 ms
========quicklz 1.5 level=1=============
压缩次数:99999
压缩前512.0bytes
压缩后521.0bytes
压缩比101.7%
message interval=13524.617 ms
Benchmark (length) Mode Cnt Score Error Units
ParseEngineBenchmark.handleCrypto 128 thrpt 10 23498520.072 ± 147439.448 ops/s
ParseEngineBenchmark.handleCrypto 256 thrpt 10 13012848.096 ± 91744.196 ops/s
ParseEngineBenchmark.handleCrypto 512 thrpt 10 6987139.635 ± 55758.317 ops/s
ParseEngineBenchmark.handleCrypto 1024 thrpt 10 3592968.421 ± 26667.700 ops/s
ParseEngineBenchmark.handleCrypto 2048 thrpt 10 1821289.843 ± 26068.168 ops/s
ParseEngineBenchmark.handleCrypto 4096 thrpt 10 915627.601 ± 5314.977 ops/s
ParseEngineBenchmark.handleUnCrypto 128 thrpt 10 21200465.199 ± 153097.520 ops/s
ParseEngineBenchmark.handleUnCrypto 256 thrpt 10 11826135.748 ± 63478.038 ops/s
ParseEngineBenchmark.handleUnCrypto 512 thrpt 10 6328721.907 ± 26434.973 ops/s
ParseEngineBenchmark.handleUnCrypto 1024 thrpt 10 3234106.929 ± 45700.981 ops/s
ParseEngineBenchmark.handleUnCrypto 2048 thrpt 10 1645663.315 ± 5919.330 ops/s
ParseEngineBenchmark.handleUnCrypto 4096 thrpt 10 819998.644 ± 7660.814 ops/s
========ZLIB=============
压缩次数:999999
压缩前801.0bytes
压缩后468.0bytes
压缩比58.4%
message interval=26683.754 ms
尽量保证在256字节以上才压缩,否则会越压越大
========ZLIB=============
压缩次数:9999
压缩前119514.0bytes
压缩后11361.0bytes
压缩比9.5%
message interval=15538.686 ms
========ZLIB=============
压缩次数:99999
压缩前512.0bytes
压缩后523.0bytes
压缩比102.1%
message interval=2989.6726 ms