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

Documentation of zarr compression #75

Open
observingClouds opened this issue Apr 26, 2022 · 2 comments
Open

Documentation of zarr compression #75

observingClouds opened this issue Apr 26, 2022 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@observingClouds
Copy link
Owner

Explain the different approaches how BitRounding and Zarr can be used and explain why we have chosen not the alternative approach below:

import numcodecs
encoding = {
    "var1": {
        "filters": [numcodecs.BitRound(keepbits=14)],
        "compressor": numcodecs.Blosc("zstd",shuffle=numcodecs.Blosc.BITSHUFFLE)
    }
}

ds.to_zarr("out.zarr", encoding=encoding)

But as you mentioned, the issue with this solution is that "filters" are saved in the zarr files (.zattrs and .zmetadata) which makes it necessary for users to have this filter installed on their machine when opening the dataset. However, this particular filter can be seen as a one way filter and does not need a decoder for reading.

Applying bitrounding directly to the Dataset circumvents the writing of the filters information, but still keeps the information about the number of keepbits in the _QuantizeBitRoundNumberOfSignificantDigits attribute.

Originally posted by @observingClouds in #71 (comment)

@observingClouds observingClouds added the documentation Improvements or additions to documentation label Apr 26, 2022
@observingClouds
Copy link
Owner Author

I wait with this until we have the template set up ( #51 )

@aaronspring
Copy link
Collaborator

No need to wait. A notebook or rst file both work

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

No branches or pull requests

2 participants