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

Revise how the Blosc codec is specified #225

Merged
merged 3 commits into from May 3, 2023

Conversation

jbms
Copy link
Contributor

@jbms jbms commented Mar 24, 2023

The shuffle mode is now specified more clearly as null (0 in Zarr v2), "bit" (2 in Zarr v2), or "byte" (1 in Zarr v2). Using these constants rather than numbers makes it much easier to know what shuffle mode will be using from manual inspection of the metadata.

When shuffling is enabled, the typesize must now be specified explicitly in the metadata, rather than determined implicitly from the input data. This allows Blosc to function as a pure "bytes -> bytes" codec rather than an "array -> bytes" codec.

The special shuffle value of -1, which indicated to choose automatically between bit-wise or byte-wise shuffling depending on the typesize value, is not supported in the metadata.

@jbms jbms requested a review from jstriebel March 24, 2023 05:18
@normanrz
Copy link
Contributor

cc @jakirkham

docs/v3/codecs/blosc/v1.0.rst Outdated Show resolved Hide resolved
docs/v3/codecs/blosc/v1.0.rst Outdated Show resolved Hide resolved
@jbms jbms mentioned this pull request Apr 18, 2023
The `shuffle` mode is now specified more clearly as `null` (0 in Zarr
v2), `"bit"` (2 in Zarr v2), or `"byte"` (1 in Zarr v2).  Using these
constants rather than numbers makes it much easier to know what
shuffle mode will be using from manual inspection of the metadata.

When shuffling is enabled, the `typesize` must now be specified
explicitly in the metadata, rather than determined implicitly from the
input data.  This allows Blosc to function as a pure "bytes -> bytes"
codec rather than an "array -> bytes" codec.

The special `shuffle` value of `-1`, which indicated to choose
automatically between bit-wise or byte-wise shuffling depending on the
typesize value, is not supported in the metadata.
@jbms
Copy link
Contributor Author

jbms commented May 2, 2023

I updated the shuffle constants to "noshuffle", "shuffle" and "bitshuffle" to match the blosc C API. Per discussions in the ZEP1 review and the recent ZEP meeting, I have retained typesize.

docs/v3/codecs/blosc/v1.0.rst Outdated Show resolved Hide resolved
docs/v3/codecs/blosc/v1.0.rst Outdated Show resolved Hide resolved
docs/v3/codecs/blosc/v1.0.rst Outdated Show resolved Hide resolved
jbms and others added 2 commits May 3, 2023 12:40
Co-authored-by: Jonathan Striebel <jstriebel@users.noreply.github.com>
Copy link
Member

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@jstriebel jstriebel merged commit 9476653 into zarr-developers:main May 3, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants