Examples For Using HDF5 1.8.0 New FeaturesBelow are example programs which use new features in HDF5 1.8.0. These examples represent only a subset of all of the new features in HDF5 1.8.0. More examples will be added as they are made available.
scale_offset_float.c: This example demonstrates the use of the SCALE-OFFSET filter for a floating-point datatype.
scale_offset_int.c: This example demonstrates the use of the SCALE-OFFSET filter for an integer type.
h5_error.c: This example shows how to use the new Error handling APIs.
linktst.c: This example demonstrates the usage of the following API functions:
H5Pset_link_creation_order / H5Pget_link_creation_order
H5Pset_est_link_info / H5Pget_est_link_info
H5Pset_link_phase_change / H5Pget_link_phase_chang
h5_latest_mixed.c: This example describes some effects of the 'use latest format' feature on objects. This example:
An old library will only be able to read the first dataset from the resulted file and a library of version 1.8.0 and later will be able to read both datasets.
h5_latest_size.c: This example describes some effects of the 'use latest format' feature on files and their sizes. The example:
When created with the 'use latest format' feature, a file cannot be opened by a library prior to version 1.8. (Elena: #1) In addition, there is a significant difference in sizes of files with and without the "use latest format" feature. The difference in file sizes can be observed using the 'ls -l' command at the command prompt on a UNIX system. The file using the latest format feature is significantly smaller than the other (about one quarter.)
h5_ud_ext_links.c: This tutorial example shows how to use external and user-defined links.
h5_visit.c: This example demonstrates the usage of the following API functions:
H5Lvisit: recursively visits all links starting from a specified group
H5Lvisit_by_name: recursively visits all links starting from a specified group
H5Ovisit: recursively visits all objects starting from a specified object
H5Ovisit_by_name: recursively visits all objects starting from a specified object
nbit_compound.c: This example demonstrates the use of the NBIT filter for a compound datatype:
nbit_int.c: This example demonstrates the use of the NBIT filter for an integer type.
shared_comp_types.c: This program illustrates the usage of HDF5's implicit message sharing feature, which can be used to save space when the same messages are used many times in a file.
This example creates a standard file using file creation property lists to control which messages are shared. Messages that can be shared are datatypes, dataspaces, attributes, fill values, and filter pipelines. In this example, with messages sharing feature on, the file size is reduced by 15%.