-
Notifications
You must be signed in to change notification settings - Fork 176
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
Make pkg_zip compression configurable #737
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Zip offers different compression algorithms and levels. For packaging, sometimes faster compression speed is more important than size. With pkg_tar, there is already the option to use a custom compressor. For pkg_zip these use case are now possible with the exposed zip compression_level and compression_type arguments in this PR. There's a new test case that verifies that the compression settings work by comparing the compressed file sizes. The default compression level is the same as recently change for pkg_tar in
Python3.6 is already end-of-life but seems to still be used in the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see there's some steps in |
Zip offers different compression algorithms and levels. For packaging, sometimes faster compression speed is more important than size. With
pkg_tar
, there is already the option to use a custom compressor, there's no similar option forpkg_zip
yet.This PR exposes the zip
compression_level
andcompression_type
arguments forpkg_zip
, thus enabling the use case.The list of compressions is the same as Python's
ZipFile
: https://docs.python.org/3/library/zipfile.html#zipfile.ZIP_STOREDThere's a new test case that verifies that the compression settings work by comparing the compressed file sizes.
The default compression level is the same as in this recent change for
pkg_tar
in #720