Sitemap

Compression Techniques: Gzip vs Brotli vs Zstandard

7 min readDec 26, 2025

I’ll be honest with you: for the longest time, I just used Gzip for everything because that’s what everyone else was doing. Enable Gzip, boom, done. Files got smaller, websites loaded faster, everyone was happy.

Then one day I was looking at our bandwidth bills and thinking “there’s gotta be a better way.” That’s when I discovered Brotli. And then Zstandard. And then I went down this whole rabbit hole of compression algorithms.

Turns out, the compression world has moved on since Gzip became the standard. There are better options now, but nobody talks about them. So let’s talk about them.

Why Compression Even Matters

Before we dive into the algorithms, let’s talk about why this matters. When you compress your website’s assets, you’re reducing the amount of data sent over the network. Less data means faster load times and lower bandwidth costs.

A typical uncompressed JavaScript bundle might be 500KB. With Gzip, it drops to about 150KB. With Brotli, maybe 130KB. That 20KB difference might not sound like much, but across millions of requests, it adds up.

Plus, for users on slow connections or mobile data, every kilobyte counts.

Gzip: The Old Reliable

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web
Already have an account? Sign in
Sohail Saifi

Written by Sohail Saifi

Software Development Engineer | Writing the future — code, AI & more.

No responses yet

Write a response