Below are a few simple HDF5 programs (for API version >1.8.0) illustrating the most basic, and commonly used,
functionality of the HDF5 library. They should be useful for the HDF5 beginner... The makefile is
here.
The basics: Reading and Writing
- hdf5NewFile.c
- Minimal example showing how to create a new HDF5 file and fill it up with data.
- hdf5NewFileEC.c
- How to produce a new HDF5 file with error checking.
- hdf5ReadModifyWrite.c
- How to read from an HDF5 file, modify the data, and write it back.
Misc
- hdf5Query.c
- How to query an HDF5 file for various bits of information.
- hdf5Compound.c
- Simple use of compound data types in HDF5
- hdf5Hyperslab.c
- How to read/write a hyperslab.
Utilities
- mjrHDF5.c mjrHDF5.h
- Some simple utilities to make the examples less difficult to read.