Skip to content

Would it be possible to use a video codec as chunk compressor? #1087

Answered by rabernat
FirefoxMetzger asked this question in Q&A
Discussion options

You must be logged in to vote

zarr arrays where each chunk is compressed using a video codec

Adding a custom compressor is pretty straightforward. You have to implement the numcodecs Codec API. You could either contribute the codec directly to numcodecs or implement it in a third-party package. In that case, you would want to register the codec.

The delta codec is a nice simple example:
https://github.com/zarr-developers/numcodecs/blob/main/numcodecs/delta.py

The main disadvantage of a custom codec is that your data become less portable; if others can't access the codec, they can't decode the data.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@joshmoore
Comment options

@jakirkham
Comment options

@FirefoxMetzger
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by FirefoxMetzger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #1086 on July 19, 2022 16:05.