addr::to_usize's error branch only ran where usize is narrower than u64, and no such target runs tests in CI, so on x86_64 the test checked only that every u64 fits. to_usize and saturating_usize are now the usize instances of generic to_index/saturating_index; the test runs the same code with u32 standing in for a 32-bit usize: values past u32::MAX (including one an `as` cast would wrap to 0x1234) are Overflow, and the saturating form clamps. A mutant that truncates instead fails the test; the old addr.rs does not provide the helper the test needs. 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