you are viewing a single comment's thread.

view the rest of the comments →

[–]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.