decompress_chunk_exact_with decodes a chunk into a DecodeScratch the caller keeps between chunks, instead of a new Vec per chunk and per filter stage. Deflate inflates into a kept buffer with a reset (not rebuilt) inflater, shuffle interleaves into the other buffer, and Fletcher32 checks and drops its checksum in place (on the stored bytes when it is the first filter undone). Other filters go through the registry as before. Output and errors are those of decompress_chunk_exact; a unit test checks that for every pipeline shape and filter mask with one reused scratch. 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