[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

Martin Panter report at bugs.python.org
Tue Mar 17 00:59:37 CET 2015


Martin Panter added the comment:

Posting LZMAFile-etc.v5.patch with the following changes:

* Merged with current code
* Changed BZ2File(buffer_size=...) to a keyword-only parameter and restored previous unused “buffering” parameter. Also changed the LZMAFile parameter to keyword-only for consistency.
* Dropped documenting how buffer_size affects the compressed data chunk size or the fast-forward chunk size for seeking
* Dropped backslash from \* in function signatures
* Documented and tested that buffer_size=0 is not valid for the LZMAFile etc classes
* Clarified a few code comments

There is still Nikolaus’s concern about setting the buffer size to zero and doing short reads, discussed on Rietveld. Apart from that, I think this patch addresses the rest of the comments. Let me know if I missed something!

----------
Added file: http://bugs.python.org/file38514/LZMAFile-etc.v5.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23529>
_______________________________________


More information about the Python-bugs-list mailing list