The messages inside object headers describe what an object is and where its data lives. This page follows the HDF5 File Format Specification version 3.0, section IV, read 2026-11-12.
Message types
| Type | Message | Type | Message |
|---|---|---|---|
0000 | NIL (padding) | 000C | Attribute |
0001 | Dataspace | 000D | Object comment |
0002 | Link info | 000E | Object modification time (old) |
0003 | Datatype | 000F | Shared message table |
0004 | Fill value (old) | 0010 | Object header continuation |
0005 | Fill value | 0011 | Symbol table (old-style group) |
0006 | Link | 0012 | Object modification time |
0007 | External data files | 0013 | B-tree ‘K’ values |
0008 | Data layout | 0014 | Driver info |
0009 | Bogus (for testing) | 0015 | Attribute info |
000A | Group info | 0016 | Object reference count |
000B | Filter pipeline | 0017 | File space info |
Dataspace
Version (1 or 2), dimensionality (1), flags (1: bit 0 maximum sizes present), in version 2 a type (0 scalar, 1 simple, 2 null); then the current size of each dimension (L bytes each) and, with the flag, the maximum sizes (all ones for unlimited).
Datatypes
The first 4 bytes are the class and version (bits 0–3 class, 4–7 version) and 24 bits of class flags; then the element size (4 bytes) and class properties.
| Class | Type | Flags and properties |
|---|---|---|
| 0 | Fixed-point (integer) | Byte order (bit 0: 0 little, 1 big), padding bits, bit 3 signed; bit offset, bit precision. |
| 1 | Floating-point | Byte order (bits 0 and 6, including VAX order), padding, mantissa normalisation, sign position; bit offset, precision, exponent and mantissa location and size, exponent bias. |
| 2 | Time | Byte order; bit precision. |
| 3 | String | Padding (0 null-terminated, 1 null-padded, 2 space-padded), character set (0 ASCII, 1 UTF-8). |
| 4 | Bit field | Byte order, padding; bit offset, precision. |
| 5 | Opaque | Length of an ASCII tag, then the tag. |
| 6 | Compound | Number of members; each a name, byte offset and member type (versions 1–2 also hold array dimensions). |
| 7 | Reference | Type: 0 object reference, 1 dataset region reference (version 4 adds newer kinds). |
| 8 | Enumerated | Number of members; base type, names, values. |
| 9 | Variable-length | Type (0 sequence, 1 string), padding, character set; base type. Values are stored in the global heap. |
| 10 | Array | Dimensionality, sizes; base type. |
Data layout
Version 3 and 4 layout messages give a class:
| Class | Layout | Properties |
|---|---|---|
| 0 | Compact | Size and the raw data, inside the object header. |
| 1 | Contiguous | Address and size of one block of data. |
| 2 | Chunked | Chunk dimensions and an index of the chunks. |
| 3 | Virtual | Version 4: a mapping onto parts of other datasets, kept in the global heap. |
Version 4 chunked layouts name a chunk index type: 1 single chunk, 2 implicit (no
index; chunks in order), 3 fixed array, 4 extensible array, 5 version 2 B-tree.
Versions 1 to 3 always use a version 1 B-tree (TREE, node type 1).
Filter pipeline
Each filter: ID (2), name length (2, omitted for predefined filters in version 2), flags (2: bit 0 optional), number of client values (2), name, values (4 bytes each).
| ID | Filter |
|---|---|
| 1 | Deflate (zlib) |
| 2 | Shuffle: regroups bytes by position within each element |
| 3 | Fletcher-32 checksum |
| 4 | Szip |
| 5 | N-bit |
| 6 | Scale-offset |
| Up to 32,767 | Reserved for filters supported by The HDF Group and for third-party filters given an identifier on request; the specification documents only 1 to 6. |
| 32,768 to 65,535 | Private or testing use; not tracked. |
Links and fill values
- Link message (new-style groups): version 1, flags (size of the name length field, creation order present, link type present, character set present), link type (present only when not a hard link: 1 soft, 64 external, 65 to 255 user-defined), creation order (8 bytes), character set (present only when not ASCII: 1 UTF-8), name length, name, then the object address, or the soft link path, or the external file and object names.
- Groups store links either as link messages in the header (compact) or in a fractal heap indexed by a version 2 B-tree (dense), as the link info message says.
- Fill value message (version 3): flags for when space is allocated (early, late, incremental), when the fill value is written (on allocation, never, if set), whether it is undefined and whether a value follows; then the size and value.