[New-bugs-announce] [issue32728] Extend zipfile's compression level support to LZMA
report at bugs.python.org
Tue Jan 30 11:47:20 EST 2018
New submission from bbayles <bbayles at gmail.com>:
In  (issue 21417), support for setting an archive (or its files) compression level was added to the zipfile module.
That currently works for the ZIP_DEFLATED and ZIP_BZIP2 compression methods, but not for ZIP_LZMA. This is because zipfile includes its own implementation of LZMACompressor that hard-codes the default preset's parameters (see also ).
It should be possible to extend compression level settings to ZIP_LZMA by making zipfile.LZMACompressor more flexible, i.e. able to accept an LZMA preset. I think this would involve porting the function that translates presets to options (lzma_lzma_preset, see ) and passing in those options to lzma.LZMACompressor .
components: Library (Lib)
title: Extend zipfile's compression level support to LZMA
versions: Python 3.8
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce