HDF5 Metadata
HDF5 files contain two types of metadata: library metadata and user metadata.

Library metadata is generated by the HDF5 Library to describe the structure of the file and structure and contents of objects in the file. For example, library metadata includes information such as:

- A header block (the superblock) that sets up the file, sets up the initial structures, and identifies the file as a valid HDF5 file
- B-trees that describe the location of and provide access to groups and members of groups
- Object headers that set up objects in an HDF5 file

HDF5 natively interprets and understands library metadata. Library metadata is always present; even an otherwise-empty file must contain certain metadata to be a valid HDF5 file.

User metadata is provided by, and in many cases defined by, a user application; is often stored in an HDF5 attribute; and may describe virtually anything. Examples include:

- Minimum and maximum valid values in a dataset
- Conditions under which data was collected
- Data history and/or provenance
- Relationships among datasets
- Scales or other interpretive information

HDF5 does not natively understand most forms of user metadata; user metadata that the library does not natively understand must be interpreted by the application. User metadata is optional but very commonly used.

See “HDF5 Metadata” in the collection Advanced Topics in HDF5 for more complete information.