Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-07-28 The HDF5 Field Guide

Loading...
Searching...
No Matches
HDF5 Reference Manual

Navigate back: Main

The functions provided by the HDF5 API are grouped into the following modules:

Modules
Core Reference Manual Modules
Module | Language | Description
--- | --- | ---
Attributes (H5A) | C | C++ | Fortran | Java | HDF5 attribute is a small metadata object describing the nature and/or intended usage of a primary data object.
Datasets (H5D) | C | C++ | Fortran | Java | Manage HDF5 datasets, including the transfer of data between memory and disk and the description of dataset properties.
Dataspaces (H5S) | C | C++ | Fortran | Java | HDF5 dataspaces describe the shape of datasets in memory or in HDF5 files.
Datatypes (H5T) | C | C++ | Fortran | Java | HDF5 datatypes describe the element type of HDF5 datasets and attributes.
Error Handling (H5E) | C | C++ | Fortran | Java | HDF5 library error reporting.
Event Set (H5ES) | C | C++ | Fortran | Java | HDF5 event set life cycle used with HDF5 VOL connectors that enable the asynchronous feature in HDF5.
Files (H5F) | C | C++ | Fortran | Java | Manage HDF5 files.
Filters (H5Z) | C | C++ | Fortran | Java | Manage HDF5 user-defined filters.
Groups (H5G) | C | C++ | Fortran | Java | Manage HDF5 groups.
Identifiers (H5I) | C | C++ | Fortran | Java | Manage identifiers defined by the HDF5 library.
Library General (H5) | C | C++ | Fortran | Java | Manage the life cycle of HDF5 library instances.
Links (H5L) | C | C++ | Fortran | Java | Manage HDF5 links and link types.
Objects (H5O) | C | C++ | Fortran | Java | Manage HDF5 objects (groups, datasets, datatype objects).
Property Lists (H5P) | C | C++ | Fortran | Java | HDF5 property lists are the main vehicle to configure the behavior of HDF5 API functions.
Dynamically-loaded Plugins (H5PL) | C | C++ | Fortran | Java | Manage the loading behavior of HDF5 plugins.
References (H5R) | C | C++ | Fortran | Java | Manage HDF5 references (HDF5 objects, attributes, and selections on datasets a.k.a. dataset regions).
Virtual File Driver (H5FD) | C | C++ | Fortran | Java | Manage HDF5 Virtual File Driver.
VOL Connector (H5VL) | C | C++ | Fortran | Java | Manage HDF5 VOL connector plugins.
High-level Reference Manual Modules
Module | Language | Description
--- | --- | ---
HDF5 Lite APIs (H5LT,H5LD) | C | C++ | Fortran | Java | Functions to simplify creating and manipulating datasets, attributes and other features.
HDF5 Images API (H5IM) | C | C++ | Fortran | Java | Creating and manipulating HDF5 datasets intended to be interpreted as images.
HDF5 Table APIs (H5TB) | C | C++ | Fortran | Java | Creating and manipulating HDF5 datasets intended to be interpreted as tables.
HDF5 Packet Table APIs (H5PT) | C | C++ | Fortran | Java | Creating and manipulating HDF5 datasets to support append- and read-only operations on table data.
HDF5 Dimension Scales APIs (H5DS) | C | C++ | Fortran | Java | Creating and manipulating HDF5 datasets that are associated with the dimension of another HDF5 dataset.
HDF5 Optimizations APIs (H5DO) | C | C++ | Fortran | Java | Bypassing default HDF5 behavior in order to optimize for specific use cases.
Extensions (H5LR, H5LT) | C | C++ | Fortran | Java |
Additional Java Reference Manual Modules
Constants and Enumerated Types | This class contains C constants and enumerated types of HDF5 library.
Native Arrays of Numbers | This class encapsulates native methods to deal with arrays of numbers, converting from numbers to bytes and bytes to numbers.
Java Array Conversion | This is a class for handling multidimensional arrays for HDF.
Errors and Exceptions | The class HDF5Exception returns errors from the Java HDF5 Interface.
HDF5 Predefined Datatypes Deprecated List Functions with Asynchronous Functions API Compatibility Macros

Follow these simple rules and stay out of trouble:

- Handle discipline: The HDF5 API is rife with handles or identifiers, which you typically obtain by creating new HDF5 items, copying items, or retrieving facets of items. Consequently, and most importantly, you are responsible for releasing the underlying resources via the matching H5*close() call, or deal with the consequences of resource leakage.
- Closed means closed: Do not pass identifiers that were previously H5*close()-d to other API functions! It will generate an error.
- Dynamic memory allocation: The API contains a few functions in which the HDF5 library dynamically allocates memory on the caller's behalf. The caller owns this memory and eventually must free it by calling H5free_memory() and not language-explicit memory functions.
- Don't modify while iterating: Do not modify the underlying collection when an iteration is in progress!
- Use of locations: Certain API functions, typically called H5***_by_name use a combination of identifiers and path names to refer to HDF5 objects. If the identifier fully specifies the object in question, pass '.' (a dot) for the name!

Attention
  C++ Developers using HDF5 C-API functions beware:
  Several functions in this C-API take function pointers or callbacks as arguments. Examples include H5Pset_elink_cb(), H5Pset_type_conv_cb(), H5Tconvert(), and H5Ewalk2(). Application code must ensure that those callback functions return normally such to allow the HDF5 to manage its resources and maintain a consistent state. For instance, those functions must not use the C `setjmp` / `longjmp` mechanism to leave those callback functions. Within the context of C++, any exceptions thrown within the callback function must be caught, such as with a catch(…) statement. Any exception state can be placed within the provided user data function call arguments, and may be thrown again once the calling function has returned. Exceptions raised and not handled inside the callback are not supported as it might leave the HDF5 library in an inconsistent state. Similarly, using C++20 coroutines cannot be used as callbacks, since they do not support plain return statements. If a callback function yields execution to another C++20 coroutine calling HDF5 functions as well, this may lead to undefined behavior.

C++ API Guide
  New to the HDF5 C++ API? See the C++ API Introduction for an introduction, class mapping guide, and examples.

Don't like what you see? - You can help to improve this Reference Manual
  Complete the survey linked near the top of this page!
  We treat documentation like code: Fork the HDF5 repo, make changes, and create a pull request !
  See the Reference Manual (RM) Page Template for general guidance.

Navigate back: Main