Skip to main content

ndic_zarr/
lib.rs

1//! `ndic-zarr` — Zarr v3 codecs and the codec-series builder.
2//!
3//! nd-image-codecs contributes two registered Zarr v3 codecs and composes a
4//! third family from existing codecs:
5//!
6//! | Codec | Kind | Crate |
7//! | --- | --- | --- |
8//! | [`ndic_lift::CODEC_NAME`] (`nd_lift`) | array → array | `ndic-lift` |
9//! | [`HTJ2K_CODEC_NAME`] (`htj2k`) | array → bytes | `ndic-htj2k` + `ndic-codestream` |
10//! | [`ndic_zfp::CODEC_NAME`] (`zfp`) | array → bytes | `ndic-zfp` |
11//!
12//! The [`series`] module builds complete codec **pipelines** ("series") from
13//! axis metadata — `transpose` → decorrelation → plane/block codec — for the
14//! three families **nd-delta**, **nd-lift-ht**, and **nd-zfp**. See
15//! `docs/architecture/codec-series.md`.
16//!
17//! Codecs register into the `zarrs` plugin registry via `inventory` when the
18//! `zarrs` feature is enabled: `nd_lift` in `lift_codec`, `htj2k` in
19//! `htj2k_codec`, `nd_zfp` in `zfp_codec`, and — for the nd-delta family,
20//! which `zarrs` cannot otherwise run — `numcodecs.delta` in
21//! [`delta_codec`].
22
23#[cfg(feature = "zarrs")]
24pub mod delta_codec;
25pub mod htj2k;
26#[cfg(feature = "zarrs")]
27pub mod htj2k_codec;
28pub mod lift;
29#[cfg(feature = "zarrs")]
30pub mod lift_codec;
31pub mod series;
32#[cfg(feature = "wasm")]
33pub mod wasm;
34#[cfg(feature = "zarrs")]
35pub mod zfp_codec;
36
37/// The registered Zarr v3 array-to-bytes codec identifier for the HTJ2K
38/// coefficient-plane codec (independent Part 1 / Part 15 codestreams per
39/// trailing 2D plane, plus a coefficient-plane byte index for range access).
40pub const HTJ2K_CODEC_NAME: &str = "htj2k";
41
42pub use ndic_lift::CODEC_NAME as ND_LIFT_CODEC_NAME;
43pub use ndic_zfp::CODEC_NAME as ZFP_CODEC_NAME;
44pub use ndic_zfp::LEGACY_CODEC_NAME as ND_ZFP_LEGACY_CODEC_NAME;