Skip to content

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

@orenwatson

Description

@orenwatson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions