Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: experimental zstandard support #586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Phillip9587
Copy link
Contributor

This PR introduces support for the Zstandard (Zstd) algorithm, which was released as an experimental feature in Node.js 23.8.0.

Key Changes

  • Adds support for Zstandard (Zstd) as an optional compression algorithm.
  • Can be enabled per parser middleware using the experimentalZstd option.
  • Defaults to false to maintain compatibility.

Usage

To enable Zstandard in a parser middleware, set the experimentalZstd option to true:

bodyParser.json({ experimentalZstd: true })
bodyParser.raw({ experimentalZstd: true })
bodyParser.text({ experimentalZstd: true })
bodyParser.urlencoded({ experimentalZstd: true })

Notes

  • This feature is experimental and subject to changes in future Node.js releases.
  • Requires Node.js 23.8.0+ to function correctly.

closes #560

Copy link
Member

@bjohansebas bjohansebas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would really prefer to wait until the API becomes stable. This is the same stance I’m going to take with compression. There may be no changes during the transition from experimental to stable, but it’s better to use only stable APIs

Great job anyway!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zstd support?
2 participants