Jump to my Home Page Send me a message Check out stuff on GitHub Check out my photography on Instagram Check out my profile on LinkedIn Check out my profile on reddit Check me out on Facebook

Mitch Richling: HDF5 Example Programs

Author: Mitch Richling
Updated: 2023-11-15

Table of Contents

1. Introduction

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.

Get it all on github: https://github.com/richmit/ex-HDF5/

2. 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.

3. 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.

4. Utilities

mjrHDF5.c & mjrHDF5.h
Some simple utilities to make the examples less difficult to read.