libhdf5 applies filters in pipeline order, so with Fletcher32 before deflate (h5repack_filters.h5 /dset_all: shuffle, fletcher32, deflate; or h5py's set_fletcher32() then set_deflate()) the compressor holds the chunk plus a 4-byte checksum. decompress_chunk bounded every stage by the chunk size and rejected it: "deflate: output exceeds size limit". Bound each stage by the chunk size plus 4 bytes per Fletcher32 that precedes it in the pipeline. Test: fletcher32_before_deflate_decodes (h5py-written chunk, and our own shuffle + fletcher32 + deflate round trip); failed before. 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