This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nadeem.vawda
Recipients amaury.forgeotdarc, nadeem.vawda
Date 2012-10-28.16:25:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za>
In-reply-to
Content
From issue 5210:

amaury.forgeotdarc wrote:
> 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.

Ideally, I would prefer to raise an EOFError if decompress() is called
after end-of-stream is reached (for consistency with BZ2Decompressor).
However, accumulating the data in unused_data is closer to being backward-
compatible, so it's probably the better approach to take.
History
Date User Action Args
2012-10-28 16:25:19nadeem.vawdasetrecipients: + nadeem.vawda, amaury.forgeotdarc
2012-10-28 16:25:19nadeem.vawdasetmessageid: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za>
2012-10-28 16:25:19nadeem.vawdalinkissue16350 messages
2012-10-28 16:25:18nadeem.vawdacreate