This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Klamann
Recipients Klamann, martin.panter, nadeem.vawda, xiang.zhang
Date 2016-06-02.14:40:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464878453.71.0.1005132891.issue27130@psf.upfronthosting.co.za>
In-reply-to
Content
> You should be able to use a compression (or decompression) object as a workaround.

OK, let's see

>>> import zlib
>>> zc = zlib.compressobj()
>>> c1 = zc.compress(b'a' * 2**31)
>>> c2 = zc.compress(b'a' * 2**31)
>>> c3 = zc.flush()
>>> c = c1 + c2 + c3
>>> zd = zlib.decompressobj()
>>> d1 = zd.decompress(c)
Segmentation fault (core dumped)

Seriously? What is wrong with this library? I've tested this using Python 3.5.0 on linux and Python 3.5.1 on Windows.
At least with Python 2.7.6 it seems to work as expected...

So, splitting the Input in chunks of less than 2^32 byte (less than 2^31 for Python 2.x) seems to work (except for this segfault in Python 3), but it's still annoying that you have to split and concatenate data each time and remember to call flush() or you lose data...

imho, it would be best to fix the underlying issue. There is no reason why we should keep the 32 bit limitation.

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

+1
History
Date User Action Args
2016-06-02 14:40:54Klamannsetrecipients: + Klamann, nadeem.vawda, martin.panter, xiang.zhang
2016-06-02 14:40:53Klamannsetmessageid: <1464878453.71.0.1005132891.issue27130@psf.upfronthosting.co.za>
2016-06-02 14:40:53Klamannlinkissue27130 messages
2016-06-02 14:40:53Klamanncreate