Skip to content

Compression codecs in WebAssembly, Silesia corpus subset: November 2026

Reference machine
Apple M4 Pro (arm64) · macOS 26.5.2
Samples
10 per configuration, 2 captures
Measure on this machine

1. Main points

  • Of the levels tested, zstd 15 downloaded fastest or within 1% everywhere; clearly fastest from ≈100 to 250 Mbps except on x-ray (Figure 1).
  • For uploads, zstd 9, zstd 3 then zstd 1 led as bandwidth rose, except for xml in Chrome, which starts with brotli 9 (Figure 2).
  • In Firefox and Safari, the wasm Deflate codecs ran at 0.73–1.23× Chrome's speed; built-in gzip and the JavaScript libraries at 0.32–2.55× (Figure 3).
  • libdeflate, zlib-rs and zune-inflate were among the fastest Deflate decoders wherever a group led clearly: 5 of 12 pairs (Figure 7, per input and browser).

2. Across inputs and browsers

Figure 1. Fastest download, by bandwidth

Download and decompress one file. Colour marks the fastest of the levels tested, by over 3% in both captures.

  • zstd 15
  • about the same (within 3%)

Arrow keys move between bandwidth bands; Up and Down move between inputs and browsers; Enter pins one so its values stay shown; Escape clears.

Figure 2. Fastest upload, by bandwidth

Compress and upload one file. Colour marks the fastest of the levels tested, by over 3% in both captures.

  • zstd 9
  • zstd 3
  • zstd 1
  • brotli 9
  • about the same (within 3%)

Arrow keys move between bandwidth bands; Up and Down move between inputs and browsers; Enter pins one so its values stay shown; Escape clears.

Figure 3. Deflate speed relative to Chrome 156

Speed ÷ speed in Chrome 156, log scale; lines span 4 inputs, every level and capture.

  • decompress
  • compress

Arrow keys move between implementations; Left and Right between browsers; Enter pins one so its values stay shown; Escape clears.

Figure 4. Download size of compression and decompression code

kB after gzip level 6, measured at build time, by format. Browser gzip is built in; “same module” decompresses and compresses.

Arrow keys move between points; Enter pins one so its values stay shown; Escape clears.

3. Details for dickens in Chrome 156

Input
Browser

Figure 5. zstd 15 gave the fastest download of the levels tested, at every bandwidth from 1 Mbps to 1 Gbps

Time to download, then decompress dickens, 10.2 MB, relative to sending it uncompressed; log scales.

  • fastest by over 3% in both captures
  • about the same
  • other configurations

Arrow keys move between bandwidths; Enter pins one so its values stay shown; Escape clears.

Fastest by bandwidth, dickens.
Bandwidth · fastestTime per file (lower → upper bandwidth)Uncompressed
1 Mbps–1 Gbpszstd 1524 s → 33 ms82 s → 82 ms

Figure 6. The fastest upload of the levels tested went from zstd 9 to zstd 1 as bandwidth rose

Time to compress, then upload dickens, 10.2 MB, relative to sending it uncompressed; log scales.

  • fastest by over 3% in both captures
  • about the same
  • other configurations

Arrow keys move between bandwidths; Enter pins one so its values stay shown; Escape clears.

Fastest by bandwidth, dickens. Storage: 1 TB of original data kept compressed for a month in S3 Standard ($0.023/GiB-month); a tie shows its smallest option.
Bandwidth · fastestTime per file (lower → upper bandwidth)Storage, $/mo per TBvs previous winnerUncompressed
below ≈2.5 Mbpsabout the same: zstd 9, brotli 9, zstd 1526 s → 11 s$6.43—82 s → 33 s
≈2.5–7 Mbpszstd 911 s → 4 s$6.90—33 s → 12 s
≈7–20 Mbpsabout the same: zstd 9, zstd 34 s → 1.5 s$6.90about the same size12 s → 4.1 s
≈20–150 Mbpszstd 31.5 s → 240 ms$7.70+12%4.1 s → 544 ms
≈150–400 Mbpsabout the same: zstd 3, zstd 1240 ms → 111 ms$7.70about the same size544 ms → 204 ms
above ≈400 Mbpszstd 1111 ms → 60 ms$8.96+16%204 ms → 82 ms

Figure 7. zune‑inflate, Browser gzip, zlib‑rs and libdeflate decoded at least 1.75× faster than the rest

Deflate decompression speed, MB/s on a log scale, dickens, level-6 streams; whiskers are the observed min–max.

Arrow keys move between points; Enter pins one so its values stay shown; Escape clears.

Median MB/s of uncompressed data, with the observed min–max of 10 samples beside it, dickens.
Implementation, levelRatioCompressMB/s min–maxDecompressMB/s min–maxCode, kB gzippedChecksum on decode
Deflate
Browser gzipCompressionStream2.65×62.461.6–64.1656.1647–667built inCRC-32
miniz_oxide 11.90×149.9149–152250.9247–25825.5 bothnone
miniz_oxide 62.63×31.130.6–31.6349.0343–356
miniz_oxide 92.64×24.524.1–25.0349.2345–354
zune-inflatedecodes miniz_oxide 6 output2.63׆—no encoder693.9686–701dec 14.0 · no encodernone
libdeflate 12.42×204.7203–207592.9571–60535.6 bothCRC-32
libdeflate 62.64×67.266.2–68.5620.9604–633
libdeflate 92.67×33.533.0–33.9601.1594–612
zlib-rs 11.69×200.6197–204506.7506–50956.4 bothnone
zlib-rs 62.62×67.266.5–67.4635.2630–640
zlib-rs 92.64×34.934.5–35.2667.5656–673
pako 1JavaScript2.34×57.857.4–58.5179.4177–184dec 10.7 · enc 8.6*Adler-32
pako 62.65×27.026.7–27.3198.6192–203
pako 92.65×24.021.6–24.2199.2197–203
fflate 1JavaScript2.28×70.969.9–71.4191.7185–20012.7 both*CRC-32 not checked
fflate 62.58×41.040.5–41.4222.6209–231
fflate 92.58×40.239.9–40.7233.1215–238
Zstandard
zstd 12.39×400.9398–4071,243.31,230–1,260dec 51.2 · enc 121.8off by default
zstd 32.78×228.5227–2301,004.2989–1,020
zstd 93.11×35.834.0–36.11,132.71,110–1,160
zstd 153.33×5.45.35–5.471,141.91,120–1,160
LZ4
lz4_flex1.58×356.2351–3622,205.32,190–2,22026.5 bothoff by default
Brotli
brotli 11.89×108.7108–109242.7238–245dec 101.3 · enc 527.3none
brotli 42.70×69.469.2–70.0451.7445–456
brotli 93.20×10.410.3–10.5543.5528–553
Measurement notes
Conditions
Clock
Method
Codecs
Throughput
Time per file
Storage
Speed relative to Chrome
About the same
Fastest decoders
Reproduction
Build
Libraries
Commit
Artifacts
Corpus

4. Measure on this machine

Input
Reference file
or drop one anywhere on this page.

dickens: collected works of Charles Dickens.

Configurations
Libraries to run

25 configurations

Samples
Export after a run: JSON, CSV