Range-read milestone M1, first step (docs/design/range-reads.md §3(a)): a synchronous, no_std read interface with u64 offsets, read_at returning Cow<[u8]>, read_ranges, len and an as_contiguous fast path. Implemented for [u8], Vec<u8>, &T, Box<T> and Arc<T>; slices serve borrowed bytes. read_exact_at reproduces the parsers' UnexpectedEof bounds error exactly, so converted modules keep their error values. FormatError gains Storage(String) and ContiguousStorageRequired; it and the facade Error are now #[non_exhaustive] (breaking for exhaustive matches, noted in the changelog; the Python bindings' match gets a wildcard arm). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
clawhdf5-format
Pure-Rust HDF5 binary format parsing and writing — no C dependencies.
Features
- Zero-copy superblock, object header, and B-tree parsing
- Chunked dataset read/write with filter pipelines
no_stdsupport (disablestdfeature)- Optional parallel reads via Rayon
- SHA-256 provenance tracking
Usage
use clawhdf5_format::Superblock;
let data = std::fs::read("data.h5").unwrap();
let sb = Superblock::from_bytes(&data).unwrap();
println!("HDF5 version {}.{}", sb.version_major(), sb.version_minor());
License
MIT