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

Integrate with Zopfli #349

Open
Pr0methean opened this issue May 17, 2023 · 1 comment
Open

Integrate with Zopfli #349

Pr0methean opened this issue May 17, 2023 · 1 comment

Comments

@Pr0methean
Copy link

Zopfli, Google's implementation of a slow high-compression-ratio Deflate encoder, has a Rust port. (The interface is to call https://docs.rs/zopfli/latest/zopfli/fn.compress.html# with https://docs.rs/zopfli/latest/zopfli/enum.Format.html#variant.Deflate. The guts of the implementation are at https://docs.rs/zopfli/latest/src/zopfli/deflate.rs.html.)

It would be nice if we could enable Zopfli as another implementation option in flate2. I'd compile it by default in https://crates.io/crates/zip_next, but only use it when the specified Compression Level was 10 or more, unless it was the only enabled Deflate implementation.

@joshtriplett
Copy link
Member

Normally, flate2 only supports a single backend. Supporting multiple backends would be a substantial change to the crate, and most crates wouldn't want a version of flate2 that only used zopfli.

I don't think this is something we should necessarily add as long as flate2 only supports a single backend. And I'm not sure multi-backend support makes sense other than for zopfli. Given that the zopfli crate's interface seems quite easy to use, I think it might make more sense for crates that want to support both zopfli and another backend to use the zopfli crate directly and use flate2 for the non-zopfli support.

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

No branches or pull requests

2 participants