[issue8672] Error decompressing valid zlib data

2010-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch was committed in r81094 (2.7), r81095 (2.6), r81096 (3.2) and r81097 (3.1). Thank you! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue8672] Error decompressing valid zlib data

2010-05-11 Thread Gregory P. Smith
Gregory P. Smith added the comment: patch looks good. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Tests -Library (Lib) stage: needs patch -> patch review ___ Python tracker ___ ___ Python-b

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, it turned out to be quite easy indeed. Here is a patch adding a test. -- keywords: +patch Added file: http://bugs.python.org/file17288/zlib-8672.patch ___ Python tracker __

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett added the comment: >> Thanks for the debugging.  The stream comes from within a matlab 'mat' >> file.  I maintain the scipy matlab file readers; the variables within >> these files are zlib compressed streams. > > So this would be a Matlab issue, right? Yes, except scipy and numpy

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I also think we should improve the zlib module's error messages. I've added a patch in issue8681 for that. With that patch, the message you'd've encountered would have been "Error -5 while decompressing data: incomplete or truncated stream", which is quite mo

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thanks for the debugging. The stream comes from within a matlab 'mat' > file. I maintain the scipy matlab file readers; the variables within > these files are zlib compressed streams. So this would be a Matlab issue, right? > Is there (should there be) a

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Matthew Brett
Matthew Brett added the comment: Hi, > Antoine Pitrou added the comment: > > After a bit of debugging, it seems your data is not actually a complete zlib > stream (*). What did you generate it with? > > (*) in technical terms, the zlib never returns Z_STREAM_END when > decompressing your dat

[issue8672] Error decompressing valid zlib data

2010-05-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: After a bit of debugging, it seems your data is not actually a complete zlib stream (*). What did you generate it with? (*) in technical terms, the zlib never returns Z_STREAM_END when decompressing your data. The decompressobj ignores it, but the top-level d

[issue8672] Error decompressing valid zlib data

2010-05-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) -IO stage: -> needs patch versions: +Python 2.7, Python 3.2 ___ Python tracker ___ _

[issue8672] Error decompressing valid zlib data

2010-05-09 Thread Matthew Brett
New submission from Matthew Brett : 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