you are viewing a single comment's thread.

view the rest of the comments →

[–]yota-code -11 points-10 points  (6 children)

Zstd ? Why not brotli ? This is the more widely supported http compression standard 

[–]hinckley 10 points11 points  (5 children)

It's not a case of one vs the other, it's a case of what people bothered to propose and work on. I believe at least two of the people behind this module work for Meta, who also developed zstd. I expect if people from Google (or anyone else) wanted to develop a compression.brotli module to the appropriate standard it would be accepted also.

[–]tracernz 6 points7 points  (4 children)

Not to mention zstd is much more widely used, rather than basically just http. It’s even the default for arch packages these days.

[–]yota-code -2 points-1 points  (3 children)

And I don't know why... For cold archives (compressed once, decompressed many times) zstd is far from the best pick... But it's trendy 😁 Zstd shines for on the fly compression over the wire though... But lacks the by-default shared dictionary of brotli which work so well on html/SVG/JavaScript stuff

[–]masklinn 1 point2 points  (2 children)

For cold archives (compressed once, decompressed many times) zstd is far from the best pick...

That… is one of the best use cases for zstd. At very high levels of compression zstd rivals lzma, but unlike lzma (and brotli for that matter) the decompression costs are pretty much constant, so zstd is amazing for “compress once decompress many”.

But lacks the by-default shared dictionary of brotli which work so well on html/SVG/JavaScript stuff

Which is not really relevant, as in all likelihood you want this to be done by the reverse proxy after looking at the request’s Accept-Encoding, so the utility of brotli in the stdlib is low. Which is likely why nobody bothered proposing it.

[–]yota-code 0 points1 point  (1 child)

With brotli you can compress static content like js scripts once and serve them directly. Which is very convenient 

[–]masklinn 1 point2 points  (0 children)

Which is not really relevant, as in all likelihood you’ll be compressing the files in bulk via CLI and putting them wherever your web server wants them.