-
Notifications
You must be signed in to change notification settings - Fork 23
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
Future codecs #40
Comments
This setup might also expose an API to allow advanced users to do more bespoke things with their codecs, like configuring web-workers to perform decoding and encoding #33. |
Sorry for the late response, I've been traveling the past weeks. I agree that the codecs should live in a different repository as we add stuff like BLOSC, especially as they may grow in size quite a bit (could be a decently sized blob of WASM). I think we can follow the same interface as in Python numcodecs, it doesn't get much simpler :). |
It will also be useful outside of zarr, perhaps a name without |
Agreed.
Want to use use the same name, |
Yes that sounds good :), feel free to create a repo if you're happy to own it. I think this interface is pretty much the same as in numcodecs (maybe the return type should be uint8array though?). The stuff in the |
working on it :) |
In this case, you could consider dynamically loading the Blosc decompressor on the fly from a CDN, (e.g. |
Thanks for the suggestion, @kylebarron. We've had a much more extensive conversation about future codecs in the The decision to include I'd love to let a bundler take care of code-splitting the final modules for a users' application, it's just a matter of having this be ergonomic. const registry = new Map();
// let bundler do code splitting, so users can self-host compression modules
registry.add('blosc', () => import('numcodecs/blosc'));
registry.add('zlib', () => import('numcodecs/zlib'))
registry.add('gzip', () => import('numcodecs/gzip')) |
Related to #1. Currently we support
zlib
andgzip
thanks topako
, but we will want to support more codecs in the future (especially BLOSC if/when that reaches the web). I'm curious what your stance on bundling more third party libraries for decoding/encoding chunks.I'm not sure tree-shaking will work since the decoders needed for an
HTTPStore
won't be known until runtime. I would be in favor of creating something akin tonumcodecs
used in zarr and then offering some API to register a codec withzarr.js
.I think we should include the default codec (zlib/gzip for zarr.js currently but BLOSC in the future) since it will be the most user friendly. We could keep track of what decoders are supported by
zarr-codecs
inzarr
and give helpful warnings if someone needs to import a codec fromzarr-codecs
.The text was updated successfully, but these errors were encountered: