Is it possible to have different compressors, e.g. lossy and lossless for individual chunks?
In a scenario, where you have a mask of importance, where you want to keep signal with lossless compression or even with no compression, but have other parts of the signal with lossy compression for efficiency and space.
For example we have:
import zarr
z = zarr.zeros((32, 32), chunks=(4, 4))
important region that we want to keep is A(4:11,4:11)
, where we want to go lossless, e.g. zlib
, then for the rest we use quantize
from numcodecs for lossy. So we will have high precision for interesting part within mask and have lossy compression for out of mask and have two different compressor for different parts of a single array at chunk level.