Benchmark of Stream Compressors in terms of Allocation Size


BenchmarkDotNet v0.13.12, Windows 11 (10.0.22631.3085/23H2/2023Update/SunValley3)
AMD Ryzen 7 5800H with Radeon Graphics, 1 CPU, 16 logical and 8 physical cores
.NET SDK 8.0.101
  [Host]     : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2
  Job-KKQZIR : .NET 8.0.1 (8.0.123.58001), X64 RyuJIT AVX2

RunStrategy=Throughput  Compressed=EasyCompressor.Benchmarks.BaseBenchmark+CompressedArg

Comparison: Allocated

CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
DeflateCompressor 3,573 bytes (17.28 %) Large (20 KB) 3937 B 21112 B 25049 B
ZstdSharpCompressor 3,622 bytes (17.52 %) Large (20 KB) 4169 B 20944 B 25113 B
ZLibCompressor 3,579 bytes (17.31 %) Large (20 KB) 4256 B 21144 B 25401 B
GZipCompressor 3,591 bytes (17.37 %) Large (20 KB) 4264 B 21144 B 25409 B
SnappierCompressor 4,751 bytes (22.98 %) Large (20 KB) 5384 B 352 B (doubtful) 26440 B
BrotliCompressor 3,650 bytes (17.66 %) Large (20 KB) 11264 B 20961 B 35907 B
LZ4Compressor 4,386 bytes (21.22 %) Large (20 KB) 14128 B 21360 B 39904 B
ZstdCompressor (deprecated) 3,622 bytes (17.52 %) Large (20 KB) 28256 B 45280 B 73536 B
SnappyCompressor (deprecated) 4,755 bytes (23.00 %) Large (20 KB) 54576 B 46320 B 100896 B
BrotliNETCompressor (deprecated) 3,650 bytes (17.66 %) Large (20 KB) 78097 B 108793 B 190571 B
LZMACompressor 2,866 bytes (13.86 %) Large (20 KB) 1539551 B 119441 B 1661943 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
ZstdSharpCompressor 860 bytes (8.64 %) Medium (10 KB) 1136 B 10216 B 11352 B
DeflateCompressor 875 bytes (8.79 %) Medium (10 KB) 1240 B 10384 B 11624 B
ZLibCompressor 881 bytes (8.85 %) Medium (10 KB) 1560 B 10416 B 11976 B
GZipCompressor 893 bytes (8.97 %) Medium (10 KB) 1568 B 10416 B 11984 B
SnappierCompressor 1,289 bytes (12.95 %) Medium (10 KB) 1920 B 352 B (doubtful) 12248 B
BrotliCompressor 794 bytes (7.98 %) Medium (10 KB) 2696 B 10232 B 13753 B
LZ4Compressor 928 bytes (9.33 %) Medium (10 KB) 3752 B 10632 B 15336 B
ZstdCompressor (deprecated) 860 bytes (8.64 %) Medium (10 KB) 11960 B 21040 B 33000 B
SnappyCompressor (deprecated) 1,270 bytes (12.76 %) Medium (10 KB) 24368 B 21376 B 45744 B
BrotliNETCompressor (deprecated) 794 bytes (7.98 %) Medium (10 KB) 69528 B 87337 B 157689 B
LZMACompressor 741 bytes (7.45 %) Medium (10 KB) 1533178 B 108714 B 1642707 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
DeflateCompressor 1,392 bytes (69.25 %) Small (2 KB) 1744 B 2448 B 4200 B
ZstdSharpCompressor 1,687 bytes (83.93 %) Small (2 KB) 1976 B 2280 B 4256 B
ZLibCompressor 1,398 bytes (69.55 %) Small (2 KB) 2064 B 2480 B 4552 B
GZipCompressor 1,410 bytes (70.15 %) Small (2 KB) 2088 B 2480 B 4568 B
SnappierCompressor 1,812 bytes (90.15 %) Small (2 KB) 2440 B 352 B (doubtful) 4840 B
BrotliCompressor 1,494 bytes (74.33 %) Small (2 KB) 4768 B 2296 B 8512 B
ZstdCompressor (deprecated) 1,687 bytes (83.93 %) Small (2 KB) 5672 B 5992 B 11664 B
LZ4Compressor 1,768 bytes (87.96 %) Small (2 KB) 6272 B 2696 B 10760 B
SnappyCompressor (deprecated) 1,772 bytes (88.16 %) Small (2 KB) 8160 B 6000 B 14160 B
BrotliNETCompressor (deprecated) 1,494 bytes (74.33 %) Small (2 KB) 71592 B 71455 B 144536 B
LZMACompressor 1,337 bytes (66.52 %) Small (2 KB) 1534970 B 100778 B 1637229 B
Powered by https://github.com/mjebrahimi/BenchmarkDotNetVisualizer