Feature or enhancement
Proposal:
Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either:
- Read the entire entry and write afterwards (which is memory-intensive and inefficient for large files), or
- Use a temporary file for buffered copying.
Both approaches are more complex and less performant, due to the need to decompress and recompress data.
If would be much more performant and friendly by implementing a copy() method, using the similar internal buffered copying technique introduced by #134627 with the internal _ZipRepacker.
This also opens the door to support an efficient move() operation, composed of copy(), remove(), and optionally repack().
Has this already been discussed elsewhere?
Mentioned in #134627
Links to previous discussion of this feature:
#134627
Linked PRs
Feature or enhancement
Proposal:
Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either:
Both approaches are more complex and less performant, due to the need to decompress and recompress data.
If would be much more performant and friendly by implementing a
copy()method, using the similar internal buffered copying technique introduced by #134627 with the internal_ZipRepacker.This also opens the door to support an efficient
move()operation, composed ofcopy(),remove(), and optionallyrepack().Has this already been discussed elsewhere?
Mentioned in #134627
Links to previous discussion of this feature:
#134627
Linked PRs
copy()toZipFile#151825