Support zstd
Node.js will soon have official support for zstd. Once it is available in an official version, we can add support for it
I think the best thing to do is to wait until the API is stable. It will be released as experimental in the next version 23
@bjohansebas With Node 24 now current, will this land anytime soon? I can see a PR opened 🙏
Hey, there’s already another PR open for that. I’ve been thinking about this for several months, we could probably add it, but I need to discuss it with other team members to make sure they agree. For example, Fastify has already adopted it as far as I know, though it might be better for version 2? With the option to disable it using new configuration options (https://github.com/expressjs/compression/pull/232)
For what it's worth, gzip performs better for small payloads, it seems like zstd benefits start being a benefit once you are above several kb.
Given this repo enables Brotli by default I think users will see a performance and compression gain either way, but if they are upgrading from pre Brotli compression middleware, a well oiled api server will see a performance decrease.
Making compression formats will definitely be asking more from end users but would be a boon to those that know what they want.