[issue27130] zlib: OverflowError while trying to compress 2^32 bytes or more

Martin Panter report at bugs.python.org
Wed Jun 1 20:11:46 EDT 2016


Martin Panter added the comment:

You should be able to use a compression (or decompression) object as a workaround. But calling zlib.compress() multiple times would generate multiple separate deflated streams, which is different.

I think it is reasonable for Python to handle larger data sizes for zlib. (In theory, the 4 GiB UINT_MAX limit is platform-dependent.) IMO it is a matter of writing the patch(es), and perhaps depending on the complexity, deciding whether to apply them to 2.7 etc or just the next version of Python 3 (risk vs reward).

Alternatively (or in the mean time), I guess we could document the limitation.

----------

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


More information about the Python-bugs-list mailing list