Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example creates a chunked and ZLIB compressed dataset. It also includes comments for what needs to be done to create an SZIP compressed dataset. The example then reopens the dataset, prints the filter information, and reads the dataset:

C    F90   C++   Python

HTML Wrap
Expand
titleC

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/master
projectKeyHDFFV
hideHeadertrue
filepathexamples/h5_cmprss.c
showLineNumberstrue
progLangplain
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Expand
titleFortran

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/master
projectKeyHDFFV
hideHeadertrue
filepathfortran/examples/h5_cmprss.f90
showLineNumberstrue
progLangplain
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

Expand
titleC++

Bitbucket Server file
repoSlughdf5
branchIdrefs/heads/master
projectKeyHDFFV
hideHeadertrue
filepathc++/examples/h5tutr_cmprss.cpp
showLineNumberstrue
progLangcpp
applicationLink5ac7b370-7412-3c8c-ad20-807a68261336

For details on compiling an HDF5 application: Compiling HDF5 Applications

Remarks

  • The H5PsetH5P_chunk / h5pset_chunk_f SET_CHUNK call modifies a Dataset Creation Property List instance to store a chunked layout dataset and sets the size of the chunks used.

  • The H5PsetH5P_deflate SET_DEFLATE call modifies the Dataset Creation Property List instance to use ZLIB or DEFLATE compression. The H5Pset_szip call modifies it to use SZIP compression. There are different compression parameters required for each compression method.

  • SZIP Limitations:

    • SZIP compression can only be used with atomic datatypes that are integer, float, or char. It cannot be applied to compound, array, variable-length, enumerations, or other user-defined datatypes. The call to H5Dcreate H5D_CREATE will fail if attempting to create an SZIP compressed dataset with a non-allowed datatype. The conflict can only be detected when the property list is used.

    • There are restrictions for use of SZIP by commercial users. See the documents at SZIP Compression in HDF5 for further information on SZIP, including the SZIP copyright notice.