nitrojs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.
https://nitro.build
MIT License
6.16k stars 507 forks source link

Support Zstandard as compression algorithm #2772

Open gangsthub opened 1 month ago

gangsthub commented 1 month ago

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

manniL commented 3 weeks ago

Additional info: zstd browser support (Chromium and FF)