Skip to content

Add support for zstd - #250

Open
polys wants to merge 1 commit into
expressjs:masterfrom
polys:zstd-support
Open

polys wants to merge 1 commit into
expressjs:masterfrom
polys:zstd-support

Conversation

@polys

@polys polys commented Aug 12, 2025

Copy link
Copy Markdown

Adds support for zstd, but keeps brotli as preferred.

Resolves #217

@Phillip9587

Copy link
Copy Markdown
Member

I think we decided to wait for zstd to become stable in Node.js before using it:

@polys

polys commented Aug 12, 2025

Copy link
Copy Markdown
Author

I think we decided to wait for zstd to become stable in Node.js before using it:

Thank you, that's perfectly fine :)
I did the work for a little experiment of mine and thought I'd open the PR in case it's useful when the time is right.

@bjohansebas bjohansebas mentioned this pull request Aug 28, 2025
kirillgroshkov added a commit to NaturalCycles/js-libs that referenced this pull request Dec 21, 2025
@DienoX

DienoX commented Feb 11, 2026

Copy link
Copy Markdown

Isn't it that time already?

@Phillip9587

Copy link
Copy Markdown
Member

Zsdt is still experimental as of Node.js 25.6.1: https://nodejs.org/api/zlib.html#class-zlibzstdcompress

@bjohansebas

Copy link
Copy Markdown
Member

While it’s still experimental, it’s already being adopted by several important packages like fastify/compress, webpack-bundle-analyzer, and likely many others. I think it would be a good idea to include it. There haven’t been many issues reported about this, and the existing ones seem more like Node.js-related problems rather than ours.

That said, I do wonder whether this should probably be a major version or not. I’m asking because when I implemented Brotli in compression as a minor release, issues were reported by people who couldn’t control which encodings were accepted.

@bjohansebas bjohansebas self-assigned this Jul 6, 2026
@UlisesGascon
UlisesGascon force-pushed the master branch 2 times, most recently from 7f83fdb to 151f63e Compare September 11, 2026 10:53
zbjornson pushed a commit to zbjornson/compression that referenced this pull request Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants