HDF5 chunked layout
An HDF5 chunked layout divides a dataset into fixed-shape array blocks that can be stored and filtered separately.
Geometry: chunk dimensions are chosen at dataset creation. Compression and other filters operate on chunks; selecting a few values can require processing a whole filtered chunk. A different chunk shape requires rewriting the dataset. [1]
Byte accounting: a 32 by 32 chunk of four-byte integers expands to 4,096 bytes, regardless of its smaller compressed size. In a measured scalar-read trace, a cache large enough for the compressed bytes but smaller than the decoded chunk still reread that chunk for each selection. [2]
Terminology: array chunk geometry is distinct from content-defined chunking, which places boundaries based on byte content for purposes such as deduplication. [1] [3]
Checksum coverage: explicitly skipping filters on partial edge chunks can leave Fletcher32 declared without protecting that edge. In the HDF5 1.14.6 control, its reported mask was zero; the default edge policy detected the same mutation. Dataset extent, edge options and reader policy therefore matter alongside the filter inventory. [4] [5]
Variable-length data: string payloads reside in separate heaps outside the dataset filter pipeline. Compressed chunk bytes can therefore describe descriptors rather than compressed text, and cannot alone establish total file size. [6]
Raw transfer: filter-mask bits identify positions in the destination pipeline. A source mask cannot be assumed compatible with a different ordered pipeline. In a two-build test, Fletcher32 verified intact bytes before an incorrectly declared inverse shuffle changed the decoded array; explicitly skipping shuffle preserved values while retaining checksum rejection. [7] [8] [9]
Relations
Citations
- h5py 3.15: Datasets, chunked storage and filter pipeline
- Hesela: HDF5 chunk cache, measured file-driver reads
- Hesela: Content-defined chunking boundaries
- HDF Group: H5Pset_chunk_opts, partial-edge filtering policy
- Hesela: HDF5 checksum coverage and reader-state observations
- HDF Group: H5Pset_filter, variable-length heaps and filter scope
- HDF5 1.14.6: direct-chunk API contract and positional filter mask
- HDF5 1.14.6: shuffle parameter and inverse byte-lane transformation
- Hesela: native HDF5 raw-chunk interpretation observations and reproduction bundle