Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork366
Difference Between Codecs and Compressors#3494
-
I'm trying to understand what the difference between the codecs/compressors arguments in v3 and when I should use them in my code. Is there a general rule of thumb for when to specify a list of compressors vs. when to supply a list of codecs that I can reference? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 3 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
At the low level,
Specifically, zarr-python/src/zarr/core/array.py Lines 1064 to 1068 ine1990c0
zarr-python/src/zarr/core/array.py Lines 1080 to 1083 ine1990c0
and zarr-python/src/zarr/core/array.py Lines 1106 to 1110 ine1990c0
If I specify each of these, they all end up in the importzarra=zarr.create_array(shape=10,dtype='f8',filters=[zarr.codecs.Delta()],serializer=zarr.codecs.BytesCodec(),compressors=[zarr.codecs.ZstdCodec()],store=zarr.storage.MemoryStore())print(a.metadata.codecs)# -> (Delta(codec_name='numcodecs.delta', codec_config={}), BytesCodec(endian=<Endian.little: 'little'>), ZstdCodec(level=0, checksum=False)) Hope this helps! |
BetaWas this translation helpful?Give feedback.
All reactions
👀 1
-
Thank you so much this does help! So is it best practice then to specify each piece separately like in your final example? Or is how I've been trying to set things below sufficient? I'm trying to learn best practices for setting things up with zarr so I'm so grateful for your time! O |
BetaWas this translation helpful?Give feedback.
All reactions
-
Bat you're doing is fine. There is no filter by default and the default serializer is fine. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
-
Thank you for your help! Zarr is awesome. |
BetaWas this translation helpful?Give feedback.