uktrade / stream-unzip

Python function to stream unzip all the files in a ZIP archive on the fly
https://stream-unzip.docs.trade.gov.uk/
MIT License
277 stars 12 forks source link

Empty zips are not supported: UnexpectedSignatureError: b'PK\x05\x06' #77

Closed NZJenkins closed 9 months ago

NZJenkins commented 9 months ago

Empty zip archives (22 bytes long containing only a end of central directory record) cause an error in 0.0.89.

Easy enough to work around by checking the length of the zip is 22 bytes to detect.

michalc commented 9 months ago

Thanks for the report! Now fixed in https://github.com/uktrade/stream-unzip/pull/78 and released in 0.0.90