The reader now refuses a compound with a repeated field name or no fields and an enum member with an empty name, as libhdf5 does, but the writer still wrote them: CompoundTypeBuilder and EnumTypeBuilder build them without complaint, so clawhdf5 wrote files it could not read back. They were never valid HDF5; h5py refuses them. Datatype::check_encodable, which FileWriter::finish runs on every dataset and attribute type, now parses the type's own encoding back and refuses one the reader refuses, with the reader's reason. That keeps the writer in step with every reader check, not only these three. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
clawhdf5
Pure-Rust HDF5 reader/writer — no C dependencies.
Features
- Read and write HDF5 files entirely in Rust
- Memory-mapped I/O for large files (
mmapfeature, enabled by default) - Parallel chunk reads via Rayon (
parallelfeature) - Lazy dataset access for minimal memory usage
- h5py-compatible file output
Usage
use clawhdf5::File;
let file = File::open("data.h5").unwrap();
let dataset = file.dataset("/group/data").unwrap();
let values: Vec<f64> = dataset.read_1d().unwrap();
License
MIT