VlResolver::element and string_element return slices of the whole file, so they exist only for a resolver over &[u8]. Their *_in forms work for any Storage (a remote file): the element's bytes borrowed from the resolver's cache of heap collections, with the same null-element, NUL and size checks. h5rs decodes variable-length values with them. Test: over a read_at-only storage they give what element/string_element give over the slice, for a string with an embedded NUL, a null element and an element whose heap object has the wrong size. 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