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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: split compression features for Gzip and Brotli support #912

Merged
merged 2 commits into from
Nov 4, 2021
Merged

Feat: split compression features for Gzip and Brotli support #912

merged 2 commits into from
Nov 4, 2021

Conversation

BastiDood
Copy link
Contributor

Hello there! This PR splits the compression feature into two: compression-brotli (Brotli) and compression-gzip (Deflate and Gzip). As their names suggest, each feature is responsible for enabling support for their respective compression algorithms.

This is done in an effort to minimize the cargo tree for those who do not intend to use one or the other. Allowing the warp consumer to choose which compression algorithms to support gives finer-grained control over their dependencies, which is nice!

The async-compression crate pulls in the brotli crate when that feature is enabled. Similarly, it pulls in the flate2 crate when the deflate feature or the gzip feature is enabled. Observe that the deflate and gzip features have been merged as the compression-gzip feature in warp since they both indirectly pull in the flate2 crate anyway.

In order to maintain backwards-compatibility, the compression feature is now set to enable both compression-brotli and compression-gzip, which is the current behavior prior to this change.

To that end, if there are any issues with this PR, I'd be glad to resolve them. Thanks! 馃帀

Copy link
Owner

@seanmonstar seanmonstar left a comment

Choose a reason for hiding this comment

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

This looks excellent, thank you!

I have another PR running through CI which I think will cause a conflict with this one, so you may need to update in a few...

@BastiDood
Copy link
Contributor Author

Alrighty, everything seems to be ready! I have rebased the changes onto the latest master to keep the Git history clean. 馃殌

@seanmonstar seanmonstar merged commit a23f147 into seanmonstar:master Nov 4, 2021
@BastiDood BastiDood deleted the feat/compression-features branch November 5, 2021 05:03
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.

None yet

2 participants