[issue5210] zlib does not indicate end of compressed stream properly

Amaury Forgeot d'Arc report at bugs.python.org
Fri Aug 21 23:28:27 CEST 2009


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Hm, I tried a modified version of your first test, and I found another 
problem with the current zlib library;
starting with the input:
x = x1 + x2 + HAMLET_SCENE    # both compressed and uncompressed data

The following scenario is OK:
dco.decompress(x) # returns HAMLET_SCENE
dco.unused_data   # returns HAMLET_SCENE

But this one:
for c in x:
    dco.decompress(x) # will return HAMLET_SCENE, in several pieces
dco.unused_data   # only one character, the last of (c in x)!

This is a bug IMO: unused_data should accumulate all the extra uncompressed 
data.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5210>
_______________________________________


More information about the Python-bugs-list mailing list