ObjectHeader::parse_in(&dyn Storage, u64, ..) reads the signature, the prefix (a window of at most 34 bytes for version 2) and then each chunk, continuation chunks included, as one bounded read; the message loops run unchanged on the chunk with chunk-relative positions. parse keeps its &[u8] signature as a wrapper. Bounds errors are reported as before, with absolute positions and the file's length. New test: headers of both versions, with times, phase-change values, creation order and a continuation chunk, and every truncation of each, parse identically through a read_at-only CountingStorage. 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