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 configurable (and matching) compression level in zip
and deflate
#4931
Comments
I would also find it very useful to be able to build zero-compression ZIPs! |
As I’m digging into it, I realize that being able to specify the deflate compression level doesn’t fully cover my immediate need. EPUB zip containers have to include the The cleanest interface for the above would be to add an Any opinions? |
I think it would be very useful to have a |
The EPUB standard requires that the
mimetype
file in an OCF zip container not be compressed. I've been using system commands to build these containers, but due to cross-platform issues (otherjoel/perfect-edition-pollen#1) it would be nice to be able to build a valid zip container with Racket code.Currently neither the
zip
function nor thedeflate
function provide a way for callers to adjust the compression level from a hardcoded default, but the underlying code seems like it would be able to use any valid value (0–9) if one was provided.Additionally, this hardcoded default appears to be mismatched between
deflate
(which always uses6
) andzip
(which always uses8
for the metadata). This might be harmless, or maybe I’m reading it wrong, but if it is incorrect it could be fixed as part of this issue.If you prefer, I could try my hand at adding a PR with tests/docs to add an optional argument to both functions.
The text was updated successfully, but these errors were encountered: