Message141570
| Author |
pitrou |
| Recipients |
chortos, nadeem.vawda, petri.lehtinen, pitrou |
| Date |
2011年08月02日.15:38:31 |
| SpamBayes Score |
2.5736626e-05 |
| Marked as misclassified |
No |
| Message-id |
<1312299512.58.0.678933302287.issue12646@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I'm not a zlib specialist, but I think what this means is that the stream is not finished, but it's valid anyway.
For example, you get the same behaviour by doing:
c = zlib.compressobj()
s = c.compress(b'This is just a test string.')
s += c.flush(zlib.Z_FULL_FLUSH)
The resulting bytestring is a non-terminated zlib stream. It still decompresses to the original data fine.
I think the appropriate fix is to add an argument to flush(). Here is a patch, I named the argument "strict" by lack of imagination :) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年08月02日 15:38:32 | pitrou | set | recipients:
+ pitrou, nadeem.vawda, chortos, petri.lehtinen |
| 2011年08月02日 15:38:32 | pitrou | set | messageid: <1312299512.58.0.678933302287.issue12646@psf.upfronthosting.co.za> |
| 2011年08月02日 15:38:32 | pitrou | link | issue12646 messages |
| 2011年08月02日 15:38:31 | pitrou | create |
|