Message403316
Could you explain your use-case for this feature in a bit more detail? zipfile is meant to be a relatively high level library to do common tasks such as reading/writing/listing files.
The use case for `data_offset` proposed here seems to be relatively advanced and I don't see how it would be to useful for the vast majority of users.
(Without adding to the public API, I think you can achieve a pretty similar functionality by using the following)
compressed_data = zipfile.open(zipinfo)._read2(compressed_size)
Obviously, this relies on undocumented internals, but for a niche use case that might not be the worst thing: https://github.com/python/cpython/blob/61892c04764e1f3a659bbd09e6373687a27d36e2/Lib/zipfile.py#L1042-L1056 |
|
Date |
User |
Action |
Args |
2021-10-06 15:22:47 | ammar2 | set | recipients:
+ ammar2, zhangxp1998 |
2021-10-06 15:22:47 | ammar2 | set | messageid: <1633533767.42.0.957065093298.issue45006@roundup.psfhosted.org> |
2021-10-06 15:22:47 | ammar2 | link | issue45006 messages |
2021-10-06 15:22:47 | ammar2 | create | |
|