zarrs 0.15.0

A library for the Zarr storage format for multidimensional arrays and metadata
Documentation

zarrs

Latest Version zarrs documentation msrv downloads build codecov

zarrs is a Rust library for the Zarr storage format for multidimensional arrays and metadata. It supports:

A changelog can be found here. Correctness issues with past versions are detailed here.

Developed at the Department of Materials Physics, Australian National University, Canberra, Australia.

Getting Started

  • Review the implementation status.
  • View the examples.
  • Read the documentation. array::Array, storage, and metadata are good places to start.
  • Check out zarrs_tools for various tools built upon this crate. Includes:
    • A reencoder that can change codecs, chunk shape, convert Zarr V2 to V3, etc.
    • Create an OME-Zarr hierarchy from a Zarr array.
    • Transform arrays: crop, rescale, downsample, gradient magnitude, gaussian, noise filtering, etc.
    • Benchmarking tools and performance benchmarks of zarrs.

Example (Sync API)

let store_path: PathBuf = "/path/to/store".into();
let store: zarrs::storage::ReadableWritableListableStorage =
    Arc::new(zarrs::storage::store::FilesystemStore::new(&store_path)?);

let array_path: &str = "/group/array"; // /path/to/store/group/array
let array = zarrs::array::Array::new(store, array_path)?;

let chunk: ndarray::ArrayD<f32> = array.retrieve_chunk_ndarray(&[1, 0])?;
println!("Chunk [1,0] is:\n{chunk}");

zarrs Ecosystem

  • zarrs_tools: Various tools for creating and manipulating Zarr V3 data.
  • zarrs_ffi: A subset of zarrs exposed as a C API.

Licence

zarrs is licensed under either of

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.