Klamann added the comment: > 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 ---------- Added file: http://bugs.python.org/file43099/_usr_bin_python3.5.1000.crash _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27130> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com