tests/storage_equivalence.rs walks real files and runs every metadata parser converted to Storage twice per object — over the file as a slice and over a read_at-only CountingStorage — and requires identical results, values and errors alike; the only allowed difference is the clean ContiguousStorageRequired from the structures still indexed by a v2 B-tree (dense attributes, a SOHM B-tree index), which is counted. It covers superblock and extension, cache image, SOHM table/list/B-tree, object headers, attributes, fill values, shared messages, symbol-table groups (local heap, B-tree, nodes, names), fractal heaps and their objects, VDS mappings, and fixed/extensible array chunk indexes. Inputs: every fixture; files h5py writes for what the fixtures lack (extensible arrays with super blocks and paged data blocks, paged fixed arrays, a 400-group v1 file with a user block, a 300-link dense group, dense, shared and committed-type attributes, SOHM list and B-tree indexes; honours CLAWHDF5_PYTHON / CLAWHDF5_REQUIRE_INTEROP); and, with CLAWHDF5_STORAGE_CORPUS set, a corpus such as conformance/.cache/corpus. Milestones M2/M3 add their parsers to check_object. 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