constantinpape/z5

xz compression for zarr?

gdkrmr opened this issue · 6 comments

static CompressorMap & zarrToCompressor() {

also defaultCompressionOptions is missing some defaults

inline void defaultCompressionOptions(Compressor compressor,

and there is no blosc compression for n5.

I don't think zarr supports xz compression, at least I can't find it in numcodecs. Maybe I am missing something?

also defaultCompressionOptions is missing some defaults

Very good point. I probably did not run into this yet because I did not call it with some of the compressors from c++ recently.

and there is no blosc compression for n5.

True. When I implemented z5, there was no support for blosc in n5 yet. This has changed in the meantime and should be added to z5 too.

If you have time/ want to work on this PRs for both of this are very welcome.
Otherwise I can fix the defaultCompressionOptions issue in the next few days, this is critical.
And can see when I have time to come around and add blosc compression for n5.

@gdkrmr turns out I need blosc compression in n5 for something I am working on right now. I will implement it and also fix the missing compression options.

Re: xz compression for zarr.
I have looked into this a bit and numcodecs supports lzma compression. lzma and xz use the same algorithm, but there are different versions of the compression format.
It might be possible to write chunks with the our xy compressor that are compatible with zarr/numcodecs lzma compression, but this would need to be investigated.

See python lzma for reference.

@gdkrmr
Just FYI the PR for this is there #159, but there are some errors in tests and I haven't got time to look into this yet. I will try to finish this in the next few days.

I have merged #159 now, which fixes the missing defaults for lz4 and xz and also implements blosc compression for n5.
For discussion of lzma/xz compression in zarr, see #158.

I am closing this for now, but let me know if you run into any issues @gdkrmr.