TECH Signal 398
Re-balancing Deflate Compression Levels
Go’s deflate compression levels have been rebalanced to make speed-compression trade-offs more linear and predictable.
Engineers who set compression levels in Go applications will now see a smoother, more intuitive relationship between CPU cost and size reduction. The default level is no longer an outlier that burns cycles for negligible gain. Code that previously hard-coded levels 6 to 9 can now pick a level with confidence that the trade-off is proportional.
Written by elseif from the cluster below · every claim links back to a sourceThe three things worth knowing
The gap between levels 1 and 2 is narrowed, and levels 3 to 6 are spaced so each step costs roughly the same CPU for the same compression gain.
Levels 7 to 9 remain aggressive but are now clearly separated from the general-purpose range, signalling their higher cost.
Default compression level is effectively lowered, reducing CPU load on web servers and APIs without materially increasing payload size.
THE CLUSTER
↗