3 ms·
My browser loaded that website with a header: accept-encoding: gzip, deflate, br ("br" means Brotli by Google) The response had a header: content-encoding: gz
by IvanK_net 8y ago
My browser loaded that website with a header:
accept-encoding: gzip, deflate, br ("br" means Brotli by Google)
The response had a header:
content-encoding: gzip
Zstandard looks like an improvement of DEFLATE (= gzip = zlib) and its specification is only 3x longer (even though it is introduced 22 years later): https://tools.ietf.org/html/rfc8478 https://tools.ietf.org/html/rfc8478
Since Zstandard is so simple and efficient, I thought it would get into browsers very quickly. Then, it could make sense to compress even PNG or JPG images, which are usually impossible to compress with DEFLATE.
- felixhandte 8y agoIt's something we're actively working on!
- wolf550e 8y agoBrotli is a competitor of zstd from Google. Google integrated Brotli into Chrome. Facebook are trying to get zstd into Chrome.
- JyrkiAlakuijala 8y agoWith internet speed significantly above the decompression speeds zstd is favorable. With internet speeds below the decompression speeds brotli is favorable because less bytes need to be transmitted. Usual users have internet speeds of a 10 MB/s or so, and brotli is more favorable up to around 200 MB/s (2 gbps) internet speeds. It is also not just about speed, but mobile users need to pay less with brotli as less bytes are transferred. Further (I'm not an expert on this, somewhat speculative) but likely the streaming properties of brotli are slightly better, i.e., less bytes are needed to hide in a buffer to be able to decode bytes. This may allow the browser to issue new fetches for urls in an html document earlier with brotli than with zstd.
- IvanK_net 8y agoFrom what you say, it sounds like you think, that Brotli has a better compression ratio, than Zstdandard. According to this chart, Zstandard has a better compression ratio, while compressing and decompressing faster than Brotli: https://facebook.github.io/zstd/ https://facebook.github.io/zstd/
- JyrkiAlakuijala 8y agoIt is a cherry picked data point, and not representative for brotli. There, facebook shows numbers with quality 0. However, when they compress for the web, they use brotli with quality 5 for dynamic content and quality 9 (or 11?) for static content. At higher quality settings brotli wins in compression density, and particularly so with quality 11 or with short files. Quality 0 is an irrelevant corner case of maximal compression speed, and is completely impractical for most uses. If you plot the whole curve, brotli's density is above that of zstd's for compression speed/density -- when both algos are used with same backward reference window size.
- vthriller 8y agoYou shouldn't dismiss compression speeds and hardware requirements though, as not all content in the internet is static.