zarr-java (dev.zarr:zarr-java) is a Java implementation of the Zarr v2 and v3
array storage specs, plus experimental OME-Zarr support. Public API entry points
are dev.zarr.zarrjava.v2.{Array,Group} and dev.zarr.zarrjava.v3.{Array,Group}.
- Build: Maven, compiled with
maven.compiler.release=8(build with JDK 11). - Arrays are backed by
ucar.ma2.Array(netCDF-Java). - Metadata is (de)serialized with Jackson.
core/— version-agnostic base types (Array,Group,ArrayMetadata,DataType,Attributes), shared codecs (core/codec) and chunk key encodings.v2/,v3/— spec-version-specific metadata, codecs and chunk grids.store/—Storebackends:FilesystemStore,HttpStore,S3Store,MemoryStore,ZipStore/ReadOnlyZipStore/BufferedZipStore. Keys are addressed throughStoreHandle.experimental/ome/— OME-Zarr (NGFF) v0.4 / v0.5 / v0.6 metadata models.cli/— command line wrapper.utils/— indexing helpers, notablyIndexingUtils.
Before implementing a feature, codec, data type, or behaviour change, check whether it already exists or is specified elsewhere, and use that as context. Check in this order:
- zarr-specs: the core Zarr v2/v3 specification. Is it specified, and how exactly?
- zarr-extensions: codecs, data types, chunk grids etc. that are not part of the core spec.
- Local clone:
../zarr-extensions - https://github.com/zarr-developers/zarr-extensions
- Local clone:
- zarr-python: the reference implementation. Defines the actual behaviour (defaults, edge
cases, error handling) that zarr-java must match.
- Local clone:
../zarr-python; the installed version is in.venv/lib/python*/site-packages/zarr - https://github.com/zarr-developers/zarr-python
- Local clone:
- OME-Zarr (NGFF): for anything under
experimental/ome/, the current OME-NGFF specification is at https://ngff.openmicroscopy.org/specifications/0.6/index.html.
Prefer the local clones (grep) over fetching the web. If the spec and zarr-python disagree, match zarr-python and mention the discrepancy. If nothing relevant is found, say so before designing the feature from scratch.
- IntelliJ IDEA default Java formatting; run
Reformat CodeandOptimize Importsbefore submitting changes. - User-facing documentation lives in USERGUIDE.md and USERGUIDE-OME-ZARR.md; update them alongside API changes.
- When writing code comments, keep them short and concise, do not reference other code or previous behavior.
- Use the PR template at .github/pull_request_template.md.
- Keep your summaries short and to the point.
- When adding comments or replies to PRs, always mention that Claude wrote them.