1998-07-15 12:51:50 +08:00
|
|
|
<html>
|
2002-07-06 05:13:15 +08:00
|
|
|
<head>
|
|
|
|
<title>
|
1998-12-22 06:52:56 +08:00
|
|
|
HDF5/H5Z API Specification
|
2002-07-06 05:13:15 +08:00
|
|
|
</title>
|
2003-03-15 03:12:34 +08:00
|
|
|
|
|
|
|
<!-- #BeginLibraryItem "/ed_libs/styles_RM.lbi" --><link href="ed_styles/RMelect.css" rel="stylesheet" type="text/css"><!-- #EndLibraryItem --></head>
|
1998-07-15 12:51:50 +08:00
|
|
|
|
1998-12-22 06:52:56 +08:00
|
|
|
<body bgcolor="#FFFFFF">
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
|
2003-03-15 03:12:34 +08:00
|
|
|
<!-- #BeginLibraryItem "/ed_libs/NavBar_RM.lbi" --><hr>
|
1998-07-15 13:14:11 +08:00
|
|
|
<center>
|
1998-12-22 06:52:56 +08:00
|
|
|
<table border=0 width=98%>
|
|
|
|
<tr><td valign=top align=left>
|
2003-03-15 03:12:34 +08:00
|
|
|
<a href="index.html">HDF5 documents and links</a> <br>
|
1998-12-22 06:52:56 +08:00
|
|
|
<a href="H5.intro.html">Introduction to HDF5</a> <br>
|
|
|
|
<a href="H5.user.html">HDF5 User Guide</a> <br>
|
|
|
|
<!--
|
|
|
|
<a href="Glossary.html">Glossary</a><br>
|
|
|
|
-->
|
|
|
|
</td>
|
|
|
|
<td valign=top align=right>
|
|
|
|
And in this document, the
|
|
|
|
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
|
|
|
|
<br>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5.html">H5</a>
|
|
|
|
<a href="RM_H5A.html">H5A</a>
|
|
|
|
<a href="RM_H5D.html">H5D</a>
|
|
|
|
<a href="RM_H5E.html">H5E</a>
|
|
|
|
<a href="RM_H5F.html">H5F</a>
|
|
|
|
<a href="RM_H5G.html">H5G</a>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5I.html">H5I</a>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5P.html">H5P</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<br>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5R.html">H5R</a>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5S.html">H5S</a>
|
|
|
|
<a href="RM_H5T.html">H5T</a>
|
2003-03-15 03:12:34 +08:00
|
|
|
<a href="RM_H5Z.html">H5Z</a>
|
1998-09-12 00:00:43 +08:00
|
|
|
<a href="Tools.html">Tools</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<a href="PredefDTypes.html">Datatypes</a>
|
1998-12-22 06:52:56 +08:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
1998-07-15 13:14:11 +08:00
|
|
|
</center>
|
|
|
|
<hr>
|
2003-03-15 03:12:34 +08:00
|
|
|
<!-- #EndLibraryItem --><center>
|
1998-07-15 12:51:50 +08:00
|
|
|
<h1>H5Z: Compression Interface</h1>
|
|
|
|
</center>
|
|
|
|
|
|
|
|
<h2>Compression API Functions</h2>
|
|
|
|
|
|
|
|
This function enable the user to configure a new compression
|
|
|
|
method for the local environment.
|
|
|
|
|
|
|
|
<table border=0>
|
|
|
|
<tr><td valign=top>
|
|
|
|
<ul>
|
|
|
|
<li><a href="#Compression-Register">H5Zregister</a>
|
|
|
|
</ul>
|
|
|
|
</td><td> </td><td valign=top>
|
|
|
|
<ul>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
HDF5 supports compression of raw data by compression methods
|
|
|
|
built into the library or defined by an application.
|
|
|
|
A compression method is associated with a dataset when the dataset is
|
|
|
|
created and is applied independently to each storage chunk of the dataset.
|
|
|
|
The dataset must use the <code>H5D_CHUNKED</code> storage layout.
|
|
|
|
<p>
|
|
|
|
The HDF5 library does not support compression for contiguous datasets
|
|
|
|
because of the difficulty of implementing random access for partial I/O.
|
|
|
|
Compact dataset compression is not supported because it would not produce
|
|
|
|
significant results.
|
|
|
|
<p>
|
2000-09-08 23:35:39 +08:00
|
|
|
See <a href="Datasets.html"><cite>The Dataset Interface (H5D)</cite></a>
|
|
|
|
in the <cite>HDF5 User's Guide</cite> for further information regarding
|
|
|
|
data compression.
|
1998-07-15 12:51:50 +08:00
|
|
|
|
|
|
|
<hr>
|
|
|
|
<dl>
|
|
|
|
<dt><strong>Name:</strong> <a name="Compression-Register">H5Zregister</a>
|
|
|
|
<dt><strong>Signature:</strong>
|
|
|
|
<dd><em>herr_t</em> <code>H5Zregister</code>(<em>H5Z_method_t</em> <code>method</code>,
|
|
|
|
<em>const char *</em><code>name</code>,
|
2002-07-06 05:13:15 +08:00
|
|
|
<em>H5Z_func_t</em> <code>function</code>
|
1998-07-15 12:51:50 +08:00
|
|
|
)
|
|
|
|
<dt><strong>Purpose:</strong>
|
2002-07-06 05:13:15 +08:00
|
|
|
<dd> Registers new compression / uncompression function.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><strong>Description:</strong>
|
2002-07-06 05:13:15 +08:00
|
|
|
<dd><code>H5Zregister</code> registers a new compression / uncompression
|
|
|
|
function for the compression method specified by
|
|
|
|
the method number, <code>method</code>.
|
|
|
|
<p>
|
|
|
|
<code>name</code> is used for debugging and may be the null pointer.
|
|
|
|
<p>
|
|
|
|
<code>function</code> is a user-defined function providing both
|
|
|
|
compression and uncompression; it may be the null pointer.
|
1998-07-15 12:51:50 +08:00
|
|
|
<p>
|
|
|
|
The statistics associated with a method number are not reset
|
|
|
|
by this function; they accumulate over the life of the library.
|
2003-02-12 01:09:25 +08:00
|
|
|
|
|
|
|
<p><strong>New filters</strong> are defined in two phases. Before a filter can be
|
|
|
|
linked into the application with <code>H5Zregister</code>,
|
|
|
|
<code>H5Z_func_t</code> must first be defined as follows:
|
|
|
|
|
|
|
|
<dir>
|
|
|
|
<em>typedef size_t</em> (*<code>H5Z_func_t</code>)
|
|
|
|
(<em>unsigned int</em> <code>flags</code>,
|
|
|
|
<em>size_t</em> <code>cd_nelmts</code>,
|
|
|
|
<em>const unsigned int</em> <code>cd_values[]</code>,
|
|
|
|
<em>size_t</em> <code>nbytes</code>,
|
|
|
|
<em>size_t *</em><code>buf_size</code>,
|
|
|
|
<em>void **</em><code>buf</code>)
|
|
|
|
</dir>
|
|
|
|
|
|
|
|
<p>The parameters <code>flags</code>, <code>cd_nelmts</code>,
|
|
|
|
and <code>cd_values</code> are the same as for the
|
|
|
|
<code>H5Pset_filter()</code> function.
|
|
|
|
The additional flag <code>H5Z_FLAG_REVERSE</code> is set when
|
|
|
|
the filter is called as part of the input pipeline.
|
|
|
|
The parameter <code>*buf</code> points to the input buffer
|
|
|
|
which has a total size of <code>*buf_size</code> bytes,
|
|
|
|
<code>nbytes</code> of which are valid data.
|
|
|
|
<p>The filter should perform the transformation in place if
|
|
|
|
possible and return the number of valid bytes or zero for
|
|
|
|
failure. If the transformation cannot be done in place,
|
|
|
|
then the filter should allocate a new buffer with
|
|
|
|
<code>malloc()</code> and assign it to <code>*buf</code>,
|
|
|
|
assigning the allocated size of that buffer to
|
|
|
|
<code>*buf_size</code>.
|
|
|
|
The old buffer should be freed by calling <code>free()</code>.
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><strong>Parameters:</strong>
|
|
|
|
<dl>
|
|
|
|
<dt><em>H5Z_method_t</em> <code>method</code>
|
2002-07-06 05:13:15 +08:00
|
|
|
<dd>IN: Number specifying compression method.
|
1998-07-15 12:51:50 +08:00
|
|
|
<dt><em>const char *</em><code>name</code>
|
2002-07-06 05:13:15 +08:00
|
|
|
<dd>IN: Name associated with the method number.
|
|
|
|
Used for debugging purposes only.
|
|
|
|
<dt><em>H5Z_func_t</em> <code>function</code>
|
|
|
|
<dd>IN: Compression / uncompression method.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
<dt><strong>Returns:</strong>
|
1998-10-30 06:13:17 +08:00
|
|
|
<dd>Returns a non-negative value if successful;
|
|
|
|
otherwise returns a negative value.
|
1998-07-15 12:51:50 +08:00
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
2003-03-15 03:12:34 +08:00
|
|
|
<!-- #BeginLibraryItem "/ed_libs/NavBar_RM.lbi" --><hr>
|
1998-07-15 13:14:11 +08:00
|
|
|
<center>
|
1998-12-22 06:52:56 +08:00
|
|
|
<table border=0 width=98%>
|
|
|
|
<tr><td valign=top align=left>
|
2003-03-15 03:12:34 +08:00
|
|
|
<a href="index.html">HDF5 documents and links</a> <br>
|
1998-12-22 06:52:56 +08:00
|
|
|
<a href="H5.intro.html">Introduction to HDF5</a> <br>
|
|
|
|
<a href="H5.user.html">HDF5 User Guide</a> <br>
|
|
|
|
<!--
|
|
|
|
<a href="Glossary.html">Glossary</a><br>
|
|
|
|
-->
|
|
|
|
</td>
|
|
|
|
<td valign=top align=right>
|
|
|
|
And in this document, the
|
|
|
|
<a href="RM_H5Front.html">HDF5 Reference Manual</a>
|
|
|
|
<br>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5.html">H5</a>
|
|
|
|
<a href="RM_H5A.html">H5A</a>
|
|
|
|
<a href="RM_H5D.html">H5D</a>
|
|
|
|
<a href="RM_H5E.html">H5E</a>
|
|
|
|
<a href="RM_H5F.html">H5F</a>
|
|
|
|
<a href="RM_H5G.html">H5G</a>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5I.html">H5I</a>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5P.html">H5P</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<br>
|
1998-10-30 06:13:17 +08:00
|
|
|
<a href="RM_H5R.html">H5R</a>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="RM_H5S.html">H5S</a>
|
|
|
|
<a href="RM_H5T.html">H5T</a>
|
2003-03-15 03:12:34 +08:00
|
|
|
<a href="RM_H5Z.html">H5Z</a>
|
1998-09-12 00:00:43 +08:00
|
|
|
<a href="Tools.html">Tools</a>
|
2000-12-13 06:43:02 +08:00
|
|
|
<a href="PredefDTypes.html">Datatypes</a>
|
1998-12-22 06:52:56 +08:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
1998-07-15 13:14:11 +08:00
|
|
|
</center>
|
1998-07-15 12:51:50 +08:00
|
|
|
<hr>
|
2003-03-15 03:12:34 +08:00
|
|
|
<!-- #EndLibraryItem -->
|
1998-07-15 12:51:50 +08:00
|
|
|
|
2003-03-15 03:12:34 +08:00
|
|
|
<!-- #BeginLibraryItem "/ed_libs/Footer.lbi" --><address>
|
1998-07-15 13:14:11 +08:00
|
|
|
<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a>
|
2000-07-18 03:40:34 +08:00
|
|
|
<br>
|
2001-04-19 06:03:09 +08:00
|
|
|
Describes HDF5 Release 1.5, Unreleased Development Branch
|
2003-03-15 03:12:34 +08:00
|
|
|
</address><!-- #EndLibraryItem -->
|
2001-04-19 05:50:43 +08:00
|
|
|
|
2003-03-15 03:12:34 +08:00
|
|
|
Last modified: 11 February 2003
|
|
|
|
|
1998-07-15 12:51:50 +08:00
|
|
|
</body>
|
|
|
|
</html>
|