Python supports zipping files when zlib is available, ZIP_DEFLATE
see: https://docs.python.org/3.4/library/zipfile.html
The zip
command-line program on Linux supports -1
fastest, -9
best.
Is there a way to set the compression level of a zip file created in Python’s zipfile
module?
Advertisement
Answer
Starting from python 3.7, the zipfile
module added the compresslevel
parameter.
https://docs.python.org/3/library/zipfile.html
I know this question is dated, but for people like me, that fall in this question, it may be a better option than the accepted one.