HDF5  1.13.0
Object Creation Properties

Functions

H5Z_filter_t H5Pget_filter2 (hid_t plist_id, unsigned filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config)
 Returns information about a filter in a pipeline. More...
 
int H5Pget_nfilters (hid_t plist_id)
 Returns the number of filters in the pipeline. More...
 
herr_t H5Pset_deflate (hid_t plist_id, unsigned aggression)
 Sets deflate (GNU gzip) compression method and compression level. More...
 
H5Z_filter_t H5Pget_filter1 (hid_t plist_id, unsigned filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[])
 Returns information about a filter in a pipeline (DEPRECATED) More...
 

Detailed Description

Function Documentation

◆ H5Pget_filter1()

H5Z_filter_t H5Pget_filter1 ( hid_t  plist_id,
unsigned  filter,
unsigned int *  flags,
size_t *  cd_nelmts,
unsigned  cd_values[],
size_t  namelen,
char  name[] 
)

Returns information about a filter in a pipeline (DEPRECATED)

Todo:
H5Pget_filter1() prototype does not match source in H5Pocpl.c. Also, it is not in a deprecated file. Is that okay?
Parameters
[in]plist_idProperty list identifier
[in]idxSequence number within the filter pipeline of the filter for which information is sought
[out]flagsBit vector specifying certain general properties of the filter
[in,out]cd_nelmtsNumber of elements in cd_values
[out]cd_valuesAuxiliary data for the filter
[in]namelenAnticipated number of characters in name
[out]nameName of the filter
Returns
Returns the filter identifier if successful; Otherwise returns a negative value. See: H5Z_filter_t

H5Pget_filter1() returns information about a filter, specified by its filter number, in a filter pipeline, specified by the property list with which it is associated.

plist_id must be a dataset or group creation property list.

idx is a value between zero and N-1, as described in H5Pget_nfilters(). The function will return a negative value if the filter number is out of range.

The structure of the flags argument is discussed in H5Pset_filter().

On input, cd_nelmts indicates the number of entries in the cd_values array, as allocated by the caller; on return, cd_nelmts contains the number of values defined by the filter.

If name is a pointer to an array of at least namelen bytes, the filter name will be copied into that array. The name will be null terminated if namelen is large enough. The filter name returned will be the name appearing in the file, the name registered for the filter, or an empty string.

Version
1.8.5 Function extended to work with group creation property lists.
1.8.0 N-bit and scale-offset filters added.
1.8.0 Function H5Pget_filter() renamed to H5Pget_filter1() and deprecated in this release.
1.6.4 filter parameter type changed to unsigned.

◆ H5Pget_filter2()

H5Z_filter_t H5Pget_filter2 ( hid_t  plist_id,
unsigned  filter,
unsigned int *  flags,
size_t *  cd_nelmts,
unsigned  cd_values[],
size_t  namelen,
char  name[],
unsigned *  filter_config 
)

Returns information about a filter in a pipeline.

Todo:
Signature for H5Pget_filter2 is different in H5Pocpl.c than in H5Ppublic.h
Parameters
[in]plist_idProperty list identifier
[in]idxSequence number within the filter pipeline of the filter for which information is sought
[out]flagsBit vector specifying certain general properties of the filter
[in,out]cd_nelmtsNumber of elements in cd_values
[out]cd_valuesAuxiliary data for the filter
[in]namelenAnticipated number of characters in name
[out]nameName of the filter
[out]filter_configBit field, as described in H5Zget_filter_info()
Returns
H5Z_filter_t

H5Pget_filter2() returns information about a filter specified by its filter number, in a filter pipeline specified by the property list with which it is associated.

plist_id must be a dataset or group creation property list.

idx is a value between zero and N-1, as described in H5Pget_nfilters(). The function will return a negative value if the filter number is out of range.

The structure of the flags argument is discussed in H5Pset_filter().

On input, cd_nelmts indicates the number of entries in the cd_values array, as allocated by the caller; on return, cd_nelmts contains the number of values defined by the filter.

If name is a pointer to an array of at least namelen bytes, the filter name will be copied into that array. The name will be null terminated if namelen is large enough. The filter name returned will be the name appearing in the file, the name registered for the filter, or an empty string.

filter_config is the bit field described in H5Zget_filter_info().

Version
1.8.5 Function extended to work with group creation property lists.
Since
1.8.0

◆ H5Pget_nfilters()

int H5Pget_nfilters ( hid_t  plist_id)

Returns the number of filters in the pipeline.

Todo:
Signature for H5Pget_nfilters() is different in H5Pocpl.c than in H5Ppublic.h.
Parameters
[in]plistProperty list identifier
Returns
Returns the number of filters in the pipeline if successful; otherwise returns a negative value.

H5Pget_nfilters() returns the number of filters defined in the filter pipeline associated with the property list plist.

In each pipeline, the filters are numbered from 0 through N-1, where N is the value returned by this function. During output to the file, the filters are applied in increasing order; during input from the file, they are applied in decreasing order.

H5Pget_nfilters() returns the number of filters in the pipeline, including zero (0) if there are none.

Since
1.0.0

◆ H5Pset_deflate()

herr_t H5Pset_deflate ( hid_t  plist_id,
unsigned  aggression 
)

Sets deflate (GNU gzip) compression method and compression level.

Todo:
H5Pset_deflate prototype does not match source code
Parameters
[in]plist_idProperty list identifier
[in]levelCompression level
Returns
Returns a non-negative value if successful; otherwise returns a negative value.

H5Pset_deflate() sets the deflate compression method and the compression level, level, for a dataset or group creation property list, plist_id.

The filter identifier set in the property list is H5Z_FILTER_DEFLATE.

The compression level, level, is a value from zero to nine, inclusive. A compression level of 0 (zero) indicates no compression; compression improves but speed slows progressively from levels 1 through 9:

Compression Level Gzip Action
0 No compression
1 Best compression speed; least compression
2 through 8 Compression improves; speed degrades
9 Best compression ratio; slowest speed

Note that setting the compression level to 0 (zero) does not turn off use of the gzip filter; it simply sets the filter to perform no compression as it processes the data.

HDF5 relies on GNU gzip for this compression.

Version
1.8.5 Function extended to work with group creation property lists.
Since
1.0.0