...
Before we go further, it would be better to see the benchmark result of Zstandard. I compared the compressed size and compression time of 3 1kb-sized messages (3102 bytes in total), with the Draft-implementation of ZStandard Compression Codec and all currently available CompressionCodecs. You can see the benchmark code from this commit. All elapsed times are the average of 20 1000 trials.
Codec | Level | Size | Time | Description |
---|---|---|---|---|
Gzip | - | 396 | 11,543,001153 | |
Snappy | - | 1,0635,132,056 | 37 | |
LZ4 | - | 387 | 2,066,37357 | |
Zstandard | 1 | 374 | 1,15256 | Speed-first setting. |
2 | 374 | 12,54958 | ||
3 | 379 | 14,89983 | Facebook's recommended default setting. | |
4 | 379 | 11,673226 | ||
5 | 373 | 13,197102 | ||
6 | 373 | 12,640252 | ||
7 | 373 | 14,367667 | ||
8 | 373 | 21,143707 | ||
9 | 373 | 17,023830 | ||
10 | 373 | 231,525029 | ||
11 | 373 | 351,467973 | ||
12 | 373 | 141,358985 | ||
13 | 373 | 162,316352 | ||
14 | 373 | 192,332324 | ||
15 | 374 | 351,253668 | ||
16 | 374 | 354,208996 | ||
17 | 371 | 182,179418 | ||
18 | 371 | 287,485434 | ||
19 | 368 | 269,518997 | ||
20 | 368 | 5824,522701 | ||
21 | 368 | 14890,507044 | ||
22 | 368 | 405282,486768 | Size-first setting. |
As you can see above, ZStandard outplays all existing algorithms in both of compression rate and speed, especially working with the speed-first setting (level 1).
...