Skip to content

[feat] Add zstd #251

@uhop

Description

@uhop

Describe the feature

New Content-Encoding is introduced: zstd. All browser vendors work on this feature and most support this feature already: https://caniuse.com/zstd

Why zstd? While it doesn't compress as efficiently as brotli, which we already have, it is significantly faster. It is faster and more efficient than gzip, which we have too.

zstd is added to node:zlib in v23.8.0, v22.15.0. Currently it is marked as "Experimental". We can test
if zstd-related functions are available in Node and provide this functionality conditionally. In a short while, it'll be in all supported Node versions.

Relevant references:

Personally I already saw it in the wild. For example, it is implemented by CloudFlare servers.

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions