Skip to content

Zipfile produced by Zip store has incorrect length stored (and hence wrong cksum) #931

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

Closed
orenwatson opened this issue Jan 5, 2022 · 1 comment

Comments

@orenwatson
Copy link
Contributor

You can reproduce this by doing this in the python REPL:

import numpy as np
import zarr
x = np.array([[1,2],[3,4]])
zs = zarr.ZipStore("a.zip")
zs["foo"] = x

If you then try unzip -l a.zip, you will see the length of foo listed as 4 bytes, as opposed to the correct length of 16 bytes, which you can verify by doing the above with a DirectoryStore. This results in the zipfile being corrupted. I have submitted a pull request for the one-liner fix here:

#930

This bug is present in zarr version 2.10.3 up to the current master branch.

@orenwatson orenwatson changed the title Zipfile produced by Zip store has incorrect length stored Zipfile produced by Zip store has incorrect length stored (and hence wrong cksum) Jan 5, 2022
@joshmoore
Copy link
Member

#930 is now merged. Thanks again.

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