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

Consider using zopfli's new streaming encoder feature #100

Open
AlexTMjugador opened this issue Jun 18, 2023 · 4 comments
Open

Consider using zopfli's new streaming encoder feature #100

AlexTMjugador opened this issue Jun 18, 2023 · 4 comments

Comments

@AlexTMjugador
Copy link
Contributor

I've just noticed that cargo-deb stopped using Zopfli in this commit because its API did not properly support streaming compression at the time. However, Zopfli 0.7.4 was released a little while ago with such support. If that limitation was the only reason to stop using Zopfli, you might want to give the new version a try! 😄

@kornelski
Copy link
Owner

kornelski commented Jun 20, 2023

Zopfli is super useful in places where gzip has to be used, like PNG. However, dpkg has supported xz for a long time now, and xz is a pareto improvement over gzip in speed and compression. Therefore, for cargo-deb I consider gzip support only a low-priority fallback for a small and decreasing number of very old Debian installs.

@AlexTMjugador
Copy link
Contributor Author

That makes sense, thanks for the clarification! I wouldn't mind cobbling together a PR to reintroduce Zopfli when I have time, but feel free to close this issue if you feel Zopfli is no longer in scope for the project.

@kornelski
Copy link
Owner

Yes, I'm happy to accept a PR for this.

@AlexTMjugador
Copy link
Contributor Author

I had some time to ponder this idea and realized that to implement it well I would need to extend the zopfli crate API with a writer that outputs data in Gzip format, since wrapping a DEFLATE stream in a Gzip container is a responsibility that should not belong to this crate. After that, I will consider visiting this enhancement again 🙂

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