- Dataset::filter_pipeline() (reader, lazy and mmap variants) swallowed parse errors with `.ok()`, so a malformed pipeline message silently became "no filters" and the still-compressed chunk bytes were returned as the data. It now returns Result<Option<_>>; a present-but-unparseable pipeline is Error::Format. - FileBuilder::write used std::fs::write, which truncates the destination first: a crash mid-write destroyed the existing file. It now writes a sibling temp file, syncs it, renames it over the target and syncs the directory, cleaning the temp file up on failure. Co-Authored-By: Claude Fable 5.1 <[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