◐ Shell
clean mode source ↗

Message 105474 - Python tracker

Hi,

> Antoine Pitrou <pitrou@free.fr> 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 decompress() function considers it an error.

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.

 Is there (should there be) a safe and maintained way to allow me to
read a stream that does not return Z_STREAM_END?