typedef struct H5Z_class_t { H5Z_filter_t id; /* Filter ID number */ const char *name; /* Comment for debugging */ H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */ H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */ H5Z_func_t filter; /* The actual filter function */ } H5Z_class_t;to:
typedef struct H5Z_class_t { unsigned version; /* Version # of structure */ H5Z_filter_t id; /* Filter ID number */ unsigned encoder_present; /* Flag to indicate the filter has an encoder */ unsigned decoder_present; /* Flag to indicate the filter has a decoder */ const char *name; /* Comment for debugging */ H5Z_can_apply_func_t can_apply; /* The "can apply" callback for a filter */ H5Z_set_local_func_t set_local; /* The "set local" callback for a filter */ H5Z_func_t filter; /* The actual filter function */ } H5Z_class_t;The new "encoder_present" and "decoder_present" flags should be set by the application registering the filter in order to indicate that the filter has an encoder and decoder, respectively. The "version" field should be set to the constant "H5Z_CLASS_T_VERS" by the application and will be used by the library to determine the correct format for interpreting the H5Z_class_t structure passed by the application. Including the version information allows an application to be re-linked with a later version of the HDF5 library without concern that the H5Z_class_t structure will be mis-interpreted.
If the filter fails [...] during anIf this bit is not set (i.e., the filter is required), the operation will fail.H5Dwrite
operation then the filter is just excluded from the pipeline for the chunk for which it failed...This is commonly used for compression filters: if the filter result would be larger than the input, then the compression filter returns failure and the uncompressed data is stored in the file.
H5Zfilter_is_available
(H5Z_filter_t filter
, unsigned int *filter_config_flags)
H5Zfilter_is_available
determines whether the filter
specified in filter
is available to the application. If so, the features are returned in a bit field. The feature flags are: H5Z_FILTER_CONFIG_ENCODE_ENABLED
- encoding is enabledH5Z_FILTER_CONFIG_DECODE_ENABLED
- decoding is enabledfilter
H5Pget_filter_by_id
(
hid_t plist_id
,
H5Z_filter_t filter
,
unsigned int *flags
,
size_t *cd_nelmts
,
unsigned int cd_values[]
,
size_t namelen
,
char name[]
)herr_tH5Pget_filter_by_id
( hid_tplist_id
, H5Z_filter_tfilter
, unsigned int *flags
, size_t *cd_nelmts
, unsigned intcd_values[]
, size_tnamelen
, charname[]
, unsigned int *filter_config )
- unsigned int
fileter_config
- OUT: Bit vector specifying certain general properties of the filter.
H5Z_FILTER_CONFIG_ENCODE_ENABLED
- encoding is enabled
H5Z_FILTER_CONFIG_DECODE_ENABLED
- decoding is enabled
struct
{
int32 bits_per_pixel;
int32 compression_mode;
int32 options_mask;
int32 pixels;
int32 pixels_per_block;
int32 pixels_per_scanline;
int32 config_flags
}
szip; /* for szip encoding */
CSZIP_ENCODER_ENABLED 1
CSZIP_DECODER_ENABLED 2
HCcomp_available( comp_code_t )This should not be done now.
Feature |
Comment |
Implement in: |
New error message |
Extension (Section 3.2) |
1.6.3 |
Register new function |
Change to H5Z_class_t for H5Zregister call (Section 3.2) |
1.8.0 |
Refine semantics of H5Z_OPTIONAL |
Refinement (Section 3.2) |
1.6.3 |
H5Pset_szip, fail if ZIP encoder disabled |
Refinement (Section 4.1) |
1.6.3 |
H5Dcreate, fail if ZIP encoder disabled |
Refinement (Section 4.1) |
1.6.3 |
H5Dextend, fail some cases if ZIP encoder disabled |
Refinement (Section 4.1) |
1.6.3 |
H5Dwrite, fail if ZIP encoder disabled |
Refinement (Section 4.2) |
1.6.3 |
H5Zfilter_is_available |
New API (Section 4.3) |
1.6.3 (?) |
H5Pget_filter_by_id (etc.) |
Change API (Section 4.3) |
1.6.3 (?) |
Documentation, examples |
When implemented |
1.6.3, etc. |
Tool support |
TBD, requires inquiry functions |
??? |
User applications |
requires inquiry functions |
??? |
Feature |
Comment |
Implement in: |
New error message |
Extension (Section 3.2) |
r1 |
Register new function |
(?) (Section 3.2) |
r1 |
SDsetcompress, GRsetcompress: fail if ZIP encoder disabled |
Refinement (Section 5.1) |
r1 |
SDwrite, SDwritechunk, GRwrite, GRwritechunk: fail if ZIP encoder disabled |
Refinement (Section 5.2) |
r1 |
change comp_info_t |
Change API (Section 5.3) |
r1 |
Documentation, examples |
When implemented |
r1 |
Tool support |
TBD, requires inquiry functions |
??? |
User applications |
requires inquiry functions |
??? |