THG Home Page       C Examples In HDF5 Source Code


  FTP Server location: http://www.hdfgroup.org/ftp/HDF5/current/src/unpacked/examples/

Introductory Examples:

These examples are from the Learning the Basics section of the HDF5 Tutorial.

h5_crtdat.c Creates a dataset.
h5_rdwt.c Reads, writes a dataset.
h5_crtatt.c Creates an attribute. (Opens the file created with h5_crtdat.c)
h5_crtgrp.c Creates a group.
h5_crtgrpar.c Creates groups in a file using absolute and relative paths.
h5_crtgrpd.c Creates datasets in a group. (Opens the file created with h5_crtgrpar.c)
h5_subset.c Creates a file and dataset and selects and reads a hyperslab from the dataset.
h5_extend.c Creates an extendible (unlimited dimension) dataset.
h5_cmprss.c Creates a chunked and compressed dataset.

More Advanced Examples:

h5_attribute.c Creates / Reads / Writes Attributes
h5_chunk_read.c Reads / Writes from a Chunked Dataset (reads file created by h5_extend_write.c)
h5_compound.c Creates a compound datatype, writes array of compound and reads back fields' subsets
h5_drivers.c Shows how to use virtual file drivers
h5_dtransform.c Demonstrates how the data transform features in HDF5 work
h5_elink_unix2win.c Windows to Unix traversal function for external links
h5_extend_write.c Create and appends to an extendible dataset
h5_extlink.c Create and uses external links in HDF5
h5_group.c Creates a group with two datasets, creates hard link to group and uses iterator functions
h5_interm_group.c Checks if group exists and creates intermediate groups
h5_mount.c Shows concept of mounting files
h5_read.c Reads hyperslabs from file created with h5_write.c
h5_ref2reg.c Creates, stores, and dereferences references to dataset regions
h5_reference.c Creates and reads object references
h5_select.c Selects hyperslabs and elements to write selected data from memory to file
h5_shared_mesg.c Creates a file using property lists to control which messages are shared (to save space)
h5_write.c Creates a dataset using default properties
ph5example.c Example of using parallel HDF5


Last Modified: June 18, 2013