[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-08-01 Thread Yaron de Leeuw
Yaron de Leeuw added the comment: I have submitted a PR on GitHub https://github.com/python/cpython/pull/2962 -- nosy: +jarondl versions: +Python 3.7 -Python 3.6 ___ Python tracker

[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-07-31 Thread Yaron de Leeuw
Changes by Yaron de Leeuw : -- pull_requests: +3009 ___ Python tracker ___ ___

[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-06-28 Thread wim glenn
wim glenn added the comment: This issue also got me. compresslevel kwarg works fine for tarfile.open(..., mode='w:gz') but raises exception for tarfile.open(..., mode='w|gz') I want to use stream compression, and compresslevel=1 is more than enough for my use case, the default of 9 is way

[issue26253] tarfile in stream mode always set zlib compression level to 9

2017-04-30 Thread Xiang Zhang
Xiang Zhang added the comment: *compresslevel* takes effect for modes 'w:gz', 'r:gz', 'w:bz2', 'r:bz2', 'x:gz', 'x:bz2'. For stream modes, 'r|gz', 'w|gz', 'r|bz2', 'w|bz2', the *compresslevel* doesn't make sense. It seems not hard to make it possible but I'm not sure it's worth it or there is

[issue26253] tarfile in stream mode always set zlib compression level to 9

2016-02-11 Thread Ned Deily
Changes by Ned Deily : -- nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list

[issue26253] tarfile in stream mode always set zlib compression level to 9

2016-02-09 Thread Martin Panter
Martin Panter added the comment: Actually it’s not really obvious from the signatures, but in the middle of the tarfile.open() documentation it says “. . . tarfile.open() accepts the keyword argument _compresslevel_”, so it should already be possible. --

[issue26253] tarfile in stream mode always set zlib compression level to 9

2016-01-31 Thread Patrik Dufresne
New submission from Patrik Dufresne: When using tarfile.open(mode='w|gz'), the compression level is hard-coded to 9. Seed _Stream._init_write_gz(): self.zlib.compressobj(9, 1. In regards to zlib, I would start by replacing the value of 9 by zlib.Z_DEFAULT_COMPRESSION. This is the default

[issue26253] tarfile in stream mode always set zlib compression level to 9

2016-01-31 Thread Martin Panter
Martin Panter added the comment: It looks like the default has been hard-coded to 9 ever since tarfile was added to Python. The gzip module is also hard-coded to 9 since it was added. If tarfile is changed, maybe gzip should too. Why would you want to use zlib’s default (apparently 6)? Memory