diegorep / pypng

Automatically exported from code.google.com/p/pypng
0 stars 0 forks source link

Understanding of zlib protocol is baroque and wrong. #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When pypng is doing zlib decoding it uses the unused_data attribute of the 
decompressobj object.  
This is wrong.  As <a 
href="http://www.python.org/doc/2.4.4/lib/module-zlib.html">the zlib 
documentation</a> makes reasonably clear, this is only useful when there is 
extra data past the 
end of the compressed data stream.

The right thing to do is to use unconsumed_tail, but really that is only 
required if we do incremental 
decompressing (by limiting the output block size).

Consequently, the code needs to be much simpler.

Original issue reported on code.google.com by d...@pobox.com on 9 Jun 2009 at 7:28

GoogleCodeExporter commented 8 years ago
This issue was closed by r177.

Original comment by d...@pobox.com on 9 Jun 2009 at 8:39