New submission from Matthew Brett <matthew.br...@gmail.com>: I have a valid zlib compressed string, attached here as 'mat.bin' (1.7M), that cause and error on zlib.decompress decompression:
>>> import zlib >>> data = open('mat.bin', 'rb').read() >>> out = zlib.decompress(data) Traceback (most recent call last): File "<ipython console>", line 1, in <module> error: Error -5 while decompressing data I know these data are valid, because I get the string I was expecting with: >>> dc_obj = zlib.decompressobj() >>> out = dc_obj.decompress(data) As expected, there is no remaining data after this read: >>> assert dc_obj.flush() == '' >>> I believe that the behavior of zlib.decompress(data) and zlib.decompressobj().decompress(data) should be equivalent, and that the error for zlib.decompress(data) is therefore the symptom of a bug. ---------- components: IO files: mat.bin messages: 105420 nosy: matthew.brett priority: normal severity: normal status: open title: Error decompressing valid zlib data type: behavior versions: Python 2.6, Python 3.1 Added file: http://bugs.python.org/file17279/mat.bin _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8672> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com