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

Support zstd (de)compression #322

Merged
merged 8 commits into from Feb 24, 2023
Merged

Support zstd (de)compression #322

merged 8 commits into from Feb 24, 2023

Conversation

davidpdrsn
Copy link
Member

Fixes #319

(false, true, false, true) => "deflate,zstd",
(false, false, true, true) => "br,zstd",
(false, false, false, true) => "zstd",
(false, false, false, false) => return None,
Copy link
Member Author

Choose a reason for hiding this comment

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

Not really sure what the priorities should be here.

Copy link
Collaborator

@jplatte jplatte Jan 20, 2023

Choose a reason for hiding this comment

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

zstd is great, zstd first x)
(if that means it's preferred)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Br is supposedly pretty good as well, and I guess more available than zstd?

Copy link
Collaborator

@jplatte jplatte Feb 12, 2023

Choose a reason for hiding this comment

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

I wasn't really serious, by the way. But I agree with @Nehliin, if we want to sort by quality then br should also come before deflate and gzip.

@davidpdrsn davidpdrsn changed the title Support zstd compression Support zstd (de)compression Jan 20, 2023
Copy link
Collaborator

@Nehliin Nehliin left a comment

Choose a reason for hiding this comment

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

Nice, just found some small copy paste errors

tower-http/src/content_encoding.rs Outdated Show resolved Hide resolved
tower-http/src/services/fs/serve_dir/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@Nehliin Nehliin left a comment

Choose a reason for hiding this comment

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

LGTM

@davidpdrsn davidpdrsn merged commit 255c28e into master Feb 24, 2023
@davidpdrsn davidpdrsn deleted the david/zstd branch February 24, 2023 12:00
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.

CompressionLayer add zstd support
4 participants