A message shared through the file's SOHM heap (H5Pset_shared_mesg_index) is referenced by heap ID, which needs the SOHM table from the superblock extension. Only message_data_with_sohm (used for fill values) loaded it; resolve_shared_message passed no table, so a SOHM-shared datatype, dataspace, filter pipeline or attribute failed with "invalid shared message version: 2" and the dataset or attribute could not be read. resolve_shared_message now loads the table when the reference carries a heap ID. Found while making attrs() tolerant: SOHM attributes turned from an error into missing keys in the audit read matrix. With this fix all 36 SOHM cases there match h5py (datasets, fill values and attributes, every shareable message type, libver earliest and latest). Regression test: sohm_shared_messages_resolve (h5py writes files sharing each message type on its own and all of them; values and attributes checked). 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