8000 feat(fetch): add zstandard decompression support by J3m5 · Pull Request #4238 · nodejs/undici · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat(fetch): add zstandard decompression support #4238

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

Merged
merged 2 commits into from
May 26, 2025
Merged

Conversation

J3m5
Copy link
Contributor
@J3m5 J3m5 commented May 25, 2025

This relates to...

Closes #2847

Changes

Features

Adds support for Zstandard (zstd) decompression in fetch.

Status

@J3m5 J3m5 mentioned this pull request May 25, 2025
Copy link
Member
@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@J3m5
Copy link
Contributor Author
J3m5 commented May 25, 2025

Just saw your comment, thanks!

I've amended the last commit to add two more test cases to match the ones for gzip and brotli:

  • should handle no content response with zstandard encoding
  • should handle not modified response with zstandard encoding

Copy link
Member
@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

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

The tests should be added to test/fetch; test/node-fetch is taken from node-fetch.

@J3m5
Copy link
Contributor Author
J3m5 commented May 25, 2025

@KhafraDev I noticed the other encoding tests (like gzip and brotli) are in test/node-fetch, so I followed that pattern.

Would you prefer I move all of them into the test/fetch folder instead?

@J3m5
Copy link
Contributor Author
J3m5 commented May 25, 2025

@KhafraDev Ah, I see now, test/node-fetch contains tests from the node-fetch library.

Thanks for the clarification. I’ll move the new test cases into the test/fetch folder instead.
Should I put it in the encoding.js file?

@J3m5
Copy link
Contributor Author
J3m5 commented May 25, 2025

@KhafraDev I've moved the main test to test/fetch/encoding.js and removed the others from test/node-fetch.
Let me know if this works for you.

@J3m5 J3m5 requested a review from KhafraDev May 25, 2025 16:43
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.

LGTM

8000
@J3m5
Copy link
Contributor Author
J3m5 commented May 25, 2025

@KhafraDev I applied your suggestion

@J3m5 J3m5 requested a review from bjohansebas May 26, 2025 08:36
Copy link
Member
@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit 4ab315e into nodejs:main May 26, 2025
29 of 31 checks passed
@tsctx

This comment has been minimized.

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.

fetch - zstd support
5 participants
0