nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Support Zstandard as compression algorithm

Open paulmelero opened this issue 1 year ago • 1 comments

Describe the feature

Zstandard is a fast compression algorithm, providing high compression ratios. It also offers a special mode for small data, called dictionary compression. The reference library offers a very wide range of speed / compression trade-off, and is backed by an extremely fast decoder

https://facebook.github.io/zstd/

Currently, the options to pre-compile the public assets only allow gzip "and/or" Brotli: https://nitrojs.dev/config#compresspublicassets

Potentially, zstd could provide smaller files, faster (in some scenarios –yet to be investigated).

Additional information

  • [ ] Would you be willing to help implement this feature?

paulmelero avatar Oct 02 '24 22:10 paulmelero

@pi0 is this related to https://github.com/nitrojs/nitro/issues/2880 ?

wug-ge avatar Nov 14 '24 14:11 wug-ge

Nop, that is limitation of fetch in node (indici), this is to potentially precompute zstd version of static assets.

pi0 avatar Nov 14 '24 15:11 pi0