Message113415
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. |
|
Date |
User |
Action |
Args |
2010-08-09 13:53:57 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson, gregory.p.smith, amaury.forgeotdarc, pitrou, rbcollins, BreamoreBoy |
2010-08-09 13:53:56 | kristjan.jonsson | set | messageid: <1281362036.76.0.478625630252.issue5804@psf.upfronthosting.co.za> |
2010-08-09 13:53:55 | kristjan.jonsson | link | issue5804 messages |
2010-08-09 13:53:54 | kristjan.jonsson | create | |
|