Message113415
| Author |
kristjan.jonsson |
| Recipients |
BreamoreBoy, amaury.forgeotdarc, gregory.p.smith, kristjan.jonsson, pitrou, rbcollins |
| Date |
2010年08月09日.13:53:54 |
| SpamBayes Score |
2.1198903e-06 |
| Marked as misclassified |
No |
| Message-id |
<1281362036.76.0.478625630252.issue5804@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
decompressobj is indeed "enough". But if you are doing a lot of this (decompressing chunks), then using the unused_data, as it is, involves a lot of copying.
If there were a "unused_data_pos" or some equivalent, then it would be possible to continue decommpressing with buffer(olddata, unused_data_pos), without copying the source data.
The point of the "offset" keyword argument was to have a way to get this end position also without having an explicit decompressobj.
I agree that having the result type change to a tuple is not good.
So, a suggestion:
1) Add the unused_data_pos to the decompressobj.
2) (opotional) Add the automatic retrieval of this with a decompress_ex method, for convenience, making it usable without creating a decompressobj
3) (optional) Add the "offset" kw argument to decompress and (decompress_ex) making the creation of a temporary buffer() object unnecessary. |
|