Please, help us to better serve our user community by answering the following short survey:
HDF5  1.14.0
API Reference
HDF5 Reference Manual

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

Core Reference Manual Modules
Attributes (H5A)CC++FortranJavaHDF5 attribute is a small metadata object describing the nature and/or intended usage of a primary data object.
Datasets (H5D)CC++FortranJavaManage HDF5 datasets, including the transfer of data between memory and disk and the description of dataset properties.
Dataspaces (H5S)CC++FortranJavaHDF5 dataspaces describe the shape of datasets in memory or in HDF5 files.
Datatypes (H5T)CC++FortranJavaHDF5 datatypes describe the element type of HDF5 datasets and attributes.
Error Handling (H5E)CC++FortranJavaHDF5 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)CC++FortranJavaManage HDF5 files.
Filters (H5Z)C"C++"FortranJavaManage HDF5 user-defined filters
Groups (H5G)CC++FortranJavaManage HDF5 groups.
Identifiers (H5I)CC++FortranJavaManage identifiers defined by the HDF5 library.
Library General (H5)CC++FortranJavaManage the life cycle of HDF5 library instances.
Links (H5L)C"C++"FortranJavaManage HDF5 links and link types.
Objects (H5O)C"C++"FortranJavaManage HDF5 objects (groups, datasets, datatype objects).
Property Lists (H5P)CC++FortranJavaHDF5 property lists are the main vehicle to configure the behavior of HDF5 API functions.
Dynamically-loaded Plugins (H5PL)C"C++""Fortran"JavaManage the loading behavior of HDF5 plugins.
References (H5R)C"C++"FortranJavaManage HDF5 references (HDF5 objects, attributes, and selections on datasets a.k.a. dataset regions).
VOL Connector (H5VL)C"C++"FortranJavaManage HDF5 VOL connector plugins.
High-level Reference Manual Modules
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 TypesThis class contains C constants and enumerated types of HDF5 library.
Native Arrays of NumbersThis class encapsulates native methods to deal with arrays of numbers, converting from numbers to bytes and bytes to numbers.
Java Array ConversionThis is a class for handling multidimensional arrays for HDF.
Errors and ExceptionsThe class HDF5Exception returns errors from the Java HDF5 Interface.
HDF5 Predefined Datatypes
Deprecated functions
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.
  • Be careful with that saw: 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!
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.
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.