LocalHeap::parse_in reads the header in one bounded read, validate_free_list_in reads each free block's two lengths, and read_string_in reads from the string to the end of the data segment once and looks for the terminator there. The &[u8] methods are wrappers. New test: a heap without free space, with a valid free block and with a free block overrunning the segment, cut at every length, parse, validate and read strings 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