Benchmark of StreamAsync 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) 3936 B 21112 B 25049 B
ZstdSharpCompressor 3,622 bytes (17.52 %) Large (20 KB) 4169 B 21016 B 25185 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) 4265 B 21144 B 25409 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 22728 B 41272 B
ZstdCompressor (deprecated) 3,622 bytes (17.52 %) Large (20 KB) 28328 B 45352 B 73680 B
SnappyCompressor (deprecated) 4,755 bytes (23.00 %) Large (20 KB) 54648 B 46392 B 101040 B
BrotliNETCompressor (deprecated) 3,650 bytes (17.66 %) Large (20 KB) 77453 B 107488 B 188625 B
SnappierCompressor 4,751 bytes (22.98 %) Large (20 KB) 234846 B 352 B (doubtful) 256036 B
LZMACompressor 2,866 bytes (13.86 %) Large (20 KB) 1539532 B 119473 B 1661952 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
ZstdSharpCompressor 860 bytes (8.64 %) Medium (10 KB) 1136 B 10288 B 11424 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
BrotliCompressor 794 bytes (7.98 %) Medium (10 KB) 2696 B 10232 B 13753 B
LZ4Compressor 928 bytes (9.33 %) Medium (10 KB) 3752 B 12000 B 16704 B
ZstdCompressor (deprecated) 860 bytes (8.64 %) Medium (10 KB) 12032 B 21112 B 33144 B
SnappyCompressor (deprecated) 1,270 bytes (12.76 %) Medium (10 KB) 24440 B 21448 B 45888 B
BrotliNETCompressor (deprecated) 794 bytes (7.98 %) Medium (10 KB) 68881 B 86032 B 155743 B
SnappierCompressor 1,289 bytes (12.95 %) Medium (10 KB) 231385 B 352 B (doubtful) 241839 B
LZMACompressor 741 bytes (7.45 %) Medium (10 KB) 1533254 B 108744 B 1642730 B
CompressorCompressedSizeDataCompressDecompressCompressAndDecompress
DeflateCompressor 1,392 bytes (69.25 %) Small (2 KB) 1752 B 2448 B 4200 B
ZstdSharpCompressor 1,687 bytes (83.93 %) Small (2 KB) 1976 B 2352 B 4328 B
ZLibCompressor 1,398 bytes (69.55 %) Small (2 KB) 2072 B 2480 B 4552 B
GZipCompressor 1,410 bytes (70.15 %) Small (2 KB) 2080 B 2480 B 4568 B
BrotliCompressor 1,494 bytes (74.33 %) Small (2 KB) 4736 B 2296 B 8545 B
ZstdCompressor (deprecated) 1,687 bytes (83.93 %) Small (2 KB) 5744 B 6064 B 11808 B
LZ4Compressor 1,768 bytes (87.96 %) Small (2 KB) 6272 B 4064 B 12128 B
SnappyCompressor (deprecated) 1,772 bytes (88.16 %) Small (2 KB) 8232 B 6080 B 14304 B
BrotliNETCompressor (deprecated) 1,494 bytes (74.33 %) Small (2 KB) 70947 B 70160 B 142597 B
SnappierCompressor 1,812 bytes (90.15 %) Small (2 KB) 203222 B 352 B (doubtful) 205683 B
LZMACompressor 1,337 bytes (66.52 %) Small (2 KB) 1535018 B 100810 B 1637314 B
Powered by https://github.com/mjebrahimi/BenchmarkDotNetVisualizer