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.
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_zipyet.This PR exposes the zip
compression_levelandcompression_typearguments 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_tarin #720