Benchmark of Binary Compressors in terms of Execution Time


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: Mean

CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
SnappierCompressor⭐️ 4,751 bytes (22.98 %) Large (20 KB) 8,744.1 ns 5,701.1 ns 15,028.4 ns
LZ4Compressor⭐️ 4,356 bytes (21.07 %) Large (20 KB) 12,738.1 ns 4,465.0 ns 18,236.7 ns
SnappyCompressor (deprecated) 4,755 bytes (23.00 %) Large (20 KB) 12,788.4 ns 6,842.3 ns 20,246.9 ns
ZstdSharpCompressor⭐️ 3,622 bytes (17.52 %) Large (20 KB) 19,450.1 ns 9,998.8 ns 29,756.5 ns
ZstdCompressor (deprecated) 3,622 bytes (17.52 %) Large (20 KB) 20,047.0 ns 9,585.3 ns 31,265.3 ns
BrotliCompressor 3,650 bytes (17.66 %) Large (20 KB) 38,621.1 ns 30,052.3 ns 69,793.1 ns
GZipCompressor 3,591 bytes (17.37 %) Large (20 KB) 63,156.8 ns 20,294.4 ns 89,193.8 ns
DeflateCompressor 3,573 bytes (17.28 %) Large (20 KB) 63,283.4 ns 19,231.1 ns 87,077.7 ns
ZLibCompressor 3,579 bytes (17.31 %) Large (20 KB) 68,778.4 ns 25,038.3 ns 98,181.3 ns
BrotliNETCompressor (deprecated) 3,650 bytes (17.66 %) Large (20 KB) 74,157.9 ns 57,720.2 ns 126,530.3 ns
LZMACompressor 2,866 bytes (13.86 %) Large (20 KB) 3,953,108.5 ns 581,904.5 ns 4,608,579.0 ns
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
SnappierCompressor⭐️ 1,289 bytes (12.95 %) Medium (10 KB) 2,111.2 ns 1,447.2 ns 3,865.7 ns
SnappyCompressor (deprecated) 1,270 bytes (12.76 %) Medium (10 KB) 3,008.1 ns 1,627.5 ns 4,779.9 ns
LZ4Compressor⭐️ 914 bytes (9.19 %) Medium (10 KB) 3,356.9 ns 1,027.7 ns 4,565.4 ns
ZstdSharpCompressor⭐️ 860 bytes (8.64 %) Medium (10 KB) 5,750.3 ns 1,903.0 ns 7,797.9 ns
ZstdCompressor (deprecated) 860 bytes (8.64 %) Medium (10 KB) 6,136.2 ns 3,163.8 ns 10,319.1 ns
BrotliCompressor 794 bytes (7.98 %) Medium (10 KB) 11,716.2 ns 16,413.7 ns 28,783.9 ns
DeflateCompressor 875 bytes (8.79 %) Medium (10 KB) 20,761.5 ns 7,511.8 ns 30,997.1 ns
GZipCompressor 893 bytes (8.97 %) Medium (10 KB) 21,245.3 ns 8,199.3 ns 32,529.1 ns
ZLibCompressor 881 bytes (8.85 %) Medium (10 KB) 24,243.1 ns 10,331.7 ns 36,667.7 ns
BrotliNETCompressor (deprecated) 794 bytes (7.98 %) Medium (10 KB) 33,157.0 ns 43,216.5 ns 77,778.3 ns
LZMACompressor 741 bytes (7.45 %) Medium (10 KB) 1,685,347.4 ns 172,319.5 ns 1,902,558.1 ns
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
SnappierCompressor⭐️ 1,812 bytes (90.15 %) Small (2 KB) 1,896.3 ns 496.0 ns 2,404.1 ns
SnappyCompressor (deprecated) 1,772 bytes (88.16 %) Small (2 KB) 2,966.9 ns 741.4 ns 3,811.8 ns
LZ4Compressor⭐️ 1,747 bytes (86.92 %) Small (2 KB) 4,666.1 ns 386.4 ns 5,279.6 ns
ZstdSharpCompressor⭐️ 1,687 bytes (83.93 %) Small (2 KB) 5,337.8 ns 1,390.3 ns 6,811.5 ns
ZstdCompressor (deprecated) 1,687 bytes (83.93 %) Small (2 KB) 6,400.1 ns 2,314.9 ns 9,324.6 ns
BrotliCompressor 1,494 bytes (74.33 %) Small (2 KB) 15,028.7 ns 9,956.3 ns 25,474.5 ns
DeflateCompressor 1,392 bytes (69.25 %) Small (2 KB) 28,010.1 ns 7,999.6 ns 38,231.9 ns
GZipCompressor 1,410 bytes (70.15 %) Small (2 KB) 28,254.5 ns 8,271.2 ns 38,937.0 ns
ZLibCompressor 1,398 bytes (69.55 %) Small (2 KB) 29,545.5 ns 8,784.3 ns 39,666.2 ns
BrotliNETCompressor (deprecated) 1,494 bytes (74.33 %) Small (2 KB) 36,464.3 ns 27,544.7 ns 70,776.0 ns
LZMACompressor 1,337 bytes (66.52 %) Small (2 KB) 1,452,197.8 ns 241,441.3 ns 1,736,171.6 ns
Powered by https://github.com/mjebrahimi/BenchmarkDotNetVisualizer