4313917kept parse_v1_messages out of line (#[inline(never)]) so the generic parser would not carry the loop; sinceef428d7the slice path is compiled once in this crate, and the call itself was the remaining cost of the chunk queue: A/B builds of object_header_parse_x401 with only this attribute changed put #[inline(never)] and no attribute at 24.5-24.9 us and #[inline] at 23.6-24.0 us, with8f59b2eat 23.6-24.1 us. Lazily creating the chunk list only when a continuation is found (tried too) measured no faster and was not kept. Same code otherwise: every chunk-queue check (65,536 chunks, cycles, file size budget, one chunk buffer at a time, libhdf5 order, overlap allowed) is unchanged. 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