[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-09-04 Thread Josh Triplett
Josh Triplett added the comment: As part of a reproducible build project, to allow recompressing a file with the same compression level previously used. -- ___ Python tracker

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-09-04 Thread Martin Panter
Martin Panter added the comment: I guess the compression level you want is the same as the 100–900 kB block size recorded as the third byte in the header. But I don’t see this as a particularly useful feature either. Why do you want to know the compression level? --

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-08-15 Thread Xiang Zhang
Xiang Zhang added the comment: If you don't want to manually parse it, the lib has to. Currently, bz2 delegates all the raw data parsing (compression/decompression) to the underlying C library. Unfortunately the bzip2 library doesn't expose the header info which means to get compression

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-07-05 Thread R. David Murray
R. David Murray added the comment: New features can only be added in a new feature release, which means 3.6 at the moment (the window for that is shrinking fast, though, we hit beta in September). -- nosy: +r.david.murray stage: -> needs patch versions: -Python 2.7, Python 3.5

[issue27450] bz2: BZ2File should expose compression level as an attribute

2016-07-04 Thread Josh Triplett
New submission from Josh Triplett: (This exists in both Python 3 and Python 2.) When opening an existing .bz2 file with BZ2File, I'd like to have access to the compression level, so that I don't have to manually parse the file's header to get it. BZ2File could provide the compression level