Benchmark of Binary 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
ZstdCompressor (deprecated) 3,622 bytes (17.52 %) Large (20 KB) 3752 B 20776 B 24528 B
DeflateCompressor 3,573 bytes (17.28 %) Large (20 KB) 3874 B 21112 B 24985 B
ZLibCompressor 3,579 bytes (17.31 %) Large (20 KB) 4192 B 21144 B 25337 B
GZipCompressor 3,591 bytes (17.37 %) Large (20 KB) 4202 B 21144 B 25345 B
LZ4Compressor 4,356 bytes (21.07 %) Large (20 KB) 4384 B 20704 B 25088 B
SnappierCompressor 4,751 bytes (22.98 %) Large (20 KB) 4864 B 20784 B 25648 B
BrotliCompressor 3,650 bytes (17.66 %) Large (20 KB) 14881 B 20961 B 35842 B
ZstdSharpCompressor 3,622 bytes (17.52 %) Large (20 KB) 24512 B 20728 B 45240 B
SnappyCompressor (deprecated) 4,755 bytes (23.00 %) Large (20 KB) 28960 B 20704 B 49664 B
BrotliNETCompressor (deprecated) 3,650 bytes (17.66 %) Large (20 KB) 81713 B 108793 B 190507 B
LZMACompressor 2,866 bytes (13.86 %) Large (20 KB) 1542552 B 119447 B 1661889 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
LZ4Compressor 914 bytes (9.19 %) Medium (10 KB) 944 B 9976 B 10920 B
ZstdCompressor (deprecated) 860 bytes (8.64 %) Medium (10 KB) 968 B 10048 B 11016 B
DeflateCompressor 875 bytes (8.79 %) Medium (10 KB) 1176 B 10384 B 11560 B
SnappierCompressor 1,289 bytes (12.95 %) Medium (10 KB) 1408 B 10056 B 11464 B
ZLibCompressor 881 bytes (8.85 %) Medium (10 KB) 1496 B 10416 B 11912 B
GZipCompressor 893 bytes (8.97 %) Medium (10 KB) 1504 B 10416 B 11920 B
BrotliCompressor 794 bytes (7.98 %) Medium (10 KB) 3456 B 10232 B 13689 B
ZstdSharpCompressor 860 bytes (8.64 %) Medium (10 KB) 10992 B 10000 B 20992 B
SnappyCompressor (deprecated) 1,270 bytes (12.76 %) Medium (10 KB) 12968 B 9976 B 22944 B
BrotliNETCompressor (deprecated) 794 bytes (7.98 %) Medium (10 KB) 70287 B 87336 B 157625 B
LZMACompressor 741 bytes (7.45 %) Medium (10 KB) 1533909 B 108714 B 1642643 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
DeflateCompressor 1,392 bytes (69.25 %) Small (2 KB) 1688 B 2448 B 4144 B
LZ4Compressor 1,747 bytes (86.92 %) Small (2 KB) 1776 B 2040 B 3816 B
ZstdCompressor (deprecated) 1,687 bytes (83.93 %) Small (2 KB) 1792 B 2112 B 3904 B
SnappierCompressor 1,812 bytes (90.15 %) Small (2 KB) 1928 B 2120 B 4056 B
ZLibCompressor 1,398 bytes (69.55 %) Small (2 KB) 2008 B 2480 B 4488 B
GZipCompressor 1,410 bytes (70.15 %) Small (2 KB) 2016 B 2480 B 4504 B
ZstdSharpCompressor 1,687 bytes (83.93 %) Small (2 KB) 3848 B 2064 B 5912 B
SnappyCompressor (deprecated) 1,772 bytes (88.16 %) Small (2 KB) 4200 B 2040 B 6240 B
BrotliCompressor 1,494 bytes (74.33 %) Small (2 KB) 6192 B 2296 B 8489 B
BrotliNETCompressor (deprecated) 1,494 bytes (74.33 %) Small (2 KB) 73040 B 71457 B 144505 B
LZMACompressor 1,337 bytes (66.52 %) Small (2 KB) 1536320 B 100778 B 1637377 B
Powered by https://github.com/mjebrahimi/BenchmarkDotNetVisualizer