Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zlib.error: Error -3 while decompressing data: invalid code -- missing end-of-block #971

Open
zoumath19 opened this issue May 2, 2024 · 1 comment

Comments

@zoumath19
Copy link

Issue:

Cannot extract specific file, due to corruption, read more @ Reproduce Issue

Error Dump:

zip_obj.testzip()
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/zipfile.py", line 1475, in testzip
while f.read(chunk_size): # Check CRC-32
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/zipfile.py", line 957, in read
data = self._read1(n)
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/zipfile.py", line 1033, in _read1
data = self._decompressor.decompress(data, n)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Reproduce Issue:

Python 3.11.8 Docker
Attempting to decompress a corrupt file, libre office says it's corrupt and attempts to restore

@madler
Copy link
Owner

madler commented May 2, 2024

You have a corrupt zip file, and zlib is correctly reporting it as corrupt. So what's the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants