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 cloudfire optimized version of zlib as a backend #228

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

arthurprs
Copy link
Contributor

I had a use case that needed a faster gzip encoder. Is this something interesting to push upstream?

Some brief testing showed that compression at level 6 is twice as fast as the default backend.

@alexcrichton
Copy link
Member

Nice!

Mind adding this to CI as well to get tested?

@arthurprs
Copy link
Contributor Author

I'm unsure why but CI says it doesn't compile under mingw.

@alexcrichton
Copy link
Member

It looks like inline assembly is used and that probably isn't compatible with the MinGW toolchain. Perhaps document that it doesn't work on MinGW and we can configure in the code to ignore the feature on MinGW?

@arthurprs
Copy link
Contributor Author

I modified the build to skip this feature on mingw and added a small note to the README.

@alexcrichton alexcrichton merged commit 120ba81 into rust-lang:master Feb 10, 2020
@alexcrichton
Copy link
Member

Thanks!

@RReverser
Copy link
Contributor

@arthurprs It looks like there is a bunch of feature = "zlib" conditions in https://github.com/alexcrichton/flate2-rs/blob/master/src/mem.rs that weren't extended to include cloudflare_zlib.

Is that intentional or an accidental omission?

RReverser added a commit to RReverser/flate2-rs that referenced this pull request Feb 27, 2020
@arthurprs
Copy link
Contributor Author

@RReverser good eye. I overlooked those.

@RReverser
Copy link
Contributor

Just made a PR above.

alexcrichton pushed a commit that referenced this pull request Mar 2, 2020
* Expose zlib options on cloudflare-zlib

See #228 (comment).

* Add an any_zlib feature group
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.

3 participants