Skip to content

Enable the zstd decoder - #36530

Merged
simonwuelker merged 1 commit into
servo:mainfrom
webbeef:enable-zstd-decoder
Sep 10, 2025
Merged

Enable the zstd decoder#36530
simonwuelker merged 1 commit into
servo:mainfrom
webbeef:enable-zstd-decoder

Conversation

@webbeef

@webbeef webbeef commented Apr 15, 2025

Copy link
Copy Markdown
Contributor

Uses the zstd support from async-compression to support zstd Content-Encoding.

Testing: Covered by wpt tests.

@simonwuelker

Copy link
Copy Markdown
Member

Should we also advertise zstd support in the Accept-Encoding header?

@webbeef

webbeef commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

Should we also advertise zstd support in the Accept-Encoding header?

Yes, let me add that.

@webbeef
webbeef force-pushed the enable-zstd-decoder branch from 7001445 to 3507d5e Compare April 15, 2025 14:00
@webbeef

webbeef commented Apr 15, 2025

Copy link
Copy Markdown
Contributor Author

Should we also advertise zstd support in the Accept-Encoding header?

Yes, let me add that.

Done in latest commit.

@simonwuelker simonwuelker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cool!

This can merge once you update the unit tests.

@webbeef
webbeef force-pushed the enable-zstd-decoder branch from 3507d5e to 4081224 Compare September 10, 2025 03:38
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Sep 10, 2025
@webbeef
webbeef force-pushed the enable-zstd-decoder branch from 4081224 to 3fc5ef5 Compare September 10, 2025 05:41
@webbeef

webbeef commented Sep 10, 2025

Copy link
Copy Markdown
Contributor Author

Cool!

This can merge once you update the unit tests.

Sorry I forgot about that one... I update the zstd crates version and fixed the unit tests.

Comment thread components/net/decoder.rs Outdated
Deflate(FramedRead<ZlibDecoder<StreamReader<Peekable<BodyStream>, Bytes>>, BytesCodec>),
/// A `Brotli` decoder will uncompress the brotli-encoded response content before returning it.
Brotli(FramedRead<BrotliDecoder<StreamReader<Peekable<BodyStream>, Bytes>>, BytesCodec>),
/// A `Zstd` decoder will uncompress the brotli-encoded response content before returning it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

- brotli-encoded response
+ zlib-encoded response

Signed-off-by: webbeef <me@webbeef.org>
@webbeef
webbeef force-pushed the enable-zstd-decoder branch from 3fc5ef5 to 6926883 Compare September 10, 2025 13:37
@simonwuelker
simonwuelker added this pull request to the merge queue Sep 10, 2025
Merged via the queue into servo:main with commit bc496b0 Sep 10, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants