Ammar Askar <am...@ammaraskar.com> added the comment:
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 ---------- nosy: +ammar2 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45006> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com