-
Notifications
You must be signed in to change notification settings - Fork 7
Define codec for LZW compression #16
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
base: main
Are you sure you want to change the base?
Conversation
If this is to be called
https://en.wikipedia.org/wiki/Lempel%E2%80%93Ziv%E2%80%93Welch
|
FWIW, that's not the implementation used by the LZW codec. It is actually implemented in C and Cython at https://github.com/cgohlke/imagecodecs/blob/8776afc59c94b2531aaecb5dd969308388c9e2d0/imagecodecs/imcd.c#L1617-L2341 and https://github.com/cgohlke/imagecodecs/blob/8776afc59c94b2531aaecb5dd969308388c9e2d0/imagecodecs/_imcd.pyx#L1382-L1475. |
Thanks for the comments! I didn't recognize those complexities of the LZW algorithm and agree that defining a @cgohlke my understanding from https://github.com/cgohlke/imagecodecs/blob/8776afc59c94b2531aaecb5dd969308388c9e2d0/imagecodecs/numcodecs.py#L1527-L1540 was that Zarr uses the pure python version in https://github.com/cgohlke/imagecodecs/blob/8776afc59c94b2531aaecb5dd969308388c9e2d0/imagecodecs/_imagecodecs.py#L541 rather than the C and Cython version. Can you please clarify which implementation should be referenced by the Zarr extension definition? |
The |
I marked this PR as draft since there still seems to be discussion around the names and content. Feel free to mark it ready for review, once you're ready. |
I'm proposing adding an extension for LZW compression as a start to enabling Zarr format 3 support for imagecodecs (xref #15 )
cc @@cgohlke @d-v-b