Message174056
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. |
|
Date |
User |
Action |
Args |
2012-10-28 16:25:19 | nadeem.vawda | set | recipients:
+ nadeem.vawda, amaury.forgeotdarc |
2012-10-28 16:25:19 | nadeem.vawda | set | messageid: <1351441519.18.0.51487757055.issue16350@psf.upfronthosting.co.za> |
2012-10-28 16:25:19 | nadeem.vawda | link | issue16350 messages |
2012-10-28 16:25:18 | nadeem.vawda | create | |
|