Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

 

CodecLevelSizeTimeDescription
Gzip-39611,543,001153 
Snappy-1,0635,132,05637 
LZ4-3872,066,37357 
Zstandard13741,15256Speed-first setting.
237412,54958 
337914,89983Facebook's recommended default setting.
437911,673226 
537313,197102 
637312,640252 
737314,367667 
837321,143707 
937317,023830 
10373231,525029 
11373351,467973 
12373141,358985 
13373162,316352 
14373192,332324 
15374351,253668 
16374354,208996 
17371182,179418 
18371287,485434 
19368269,518997 
203685824,522701 
2136814890,507044 
22368405282,486768Size-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).

...