# Switched the Dolly gzip encoder to libdeflate

*4 December 2026 · Performance, Bun, Rust*

Switched Dolly’s gzip encoder to libdeflate. On a 1 MB CSV, compression dropped from 45.98 ms to 19.49 ms. Bun v1.4.5 took 22.17 ms. Dolly also produced a smaller file at 296 KB versus Bun’s 317 KB. Both ran in memory at level 6, best of 5 on an arm64 Mac.

> Dolly’s [internal project name] gzip decode time from 14.01 ms to 5.21 ms by switching flate2 to native zlib and decoding directly from the input slice.
> 
> To compare, Bun v1.4.5 took 8.01 ms on the same 1 MB gzip file. Best of 5, in memory, on an arm64 Mac. Every output matched byte for byte.
>
> — [@mohitdotdev](https://x.com/mohitdotdev)

[View original on X](https://x.com/mohitdotdev/status/2128560756765680104)
