Hacker News new | ask | show | jobs
by ankraft 1352 days ago
Zstandard is able to compress this file to 1.4MB.

  a2b67f25.bin         :  8.26%   (16777216 => 1386514 bytes, a2b67f25.bin.zst)
1 comments

brotli compresses it to 1047967 bytes. And you can serve it as-is with Content-Encoding: br, unlike zstd.

(zstd at --ultra -22 level: 1149751 bytes).

Why is Brotli more efficient on Wasm files? I believe their built-in dictionary was tuned for HTML, CSS and JS content.
I'd guess that the context model (based on last 1-2 bytes) can be used to separate opcodes and their parameters.