uktrade / stream-zip

Python function to construct a ZIP archive on the fly
https://stream-zip.docs.trade.gov.uk/
MIT License
111 stars 9 forks source link

perf: remove unnecessary for loop when not encrypting #100

Closed michalc closed 10 months ago

michalc commented 10 months ago

This remove an unnecesary intermediate for loop used when not encrypting / password protecting ZIPs

michalc commented 10 months ago

This won't working because the encryption function needs to call yield from _(chunk) to make sure that the current offset in the file is maintained