diff options
author | James Laird <jlaird@hdfgroup.org> | 2004-07-01 17:38:04 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2004-07-01 17:38:04 (GMT) |
commit | eab58732d86e9219fa9f41f9ab2e30fae94e4a7d (patch) | |
tree | 333b5f2c50c267c14611e042724a7f28d5156ab7 /src/H5Zpublic.h | |
parent | 3f500747fa0f4379e8e03b82f6d679628d55a8c3 (diff) | |
download | hdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.zip hdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.tar.gz hdf5-eab58732d86e9219fa9f41f9ab2e30fae94e4a7d.tar.bz2 |
[svn-r8781]
Purpose:
HDF5 now supports SZIP with no encoder.
Description:
SZIP can be configured to have both encoder and decoder or just to have the decoder. HDF5 can now query the configuration of any filter, and will throw errors if users try to write using a filter with encoding disabled.
Solution:
Added H5Zget_filter_info function, changed API for H5Pget_filter and H5P_get_filter_by_id. See SZIP RFC.
Platforms tested:
Copper (fortran, C++, parallel), Sleipnir (C++), Arabica (fortran, C++), Verbena (fortran, C++)
Misc. update:
Diffstat (limited to 'src/H5Zpublic.h')
-rw-r--r-- | src/H5Zpublic.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/H5Zpublic.h b/src/H5Zpublic.h index ee7ad3c..83c2ada 100644 --- a/src/H5Zpublic.h +++ b/src/H5Zpublic.h @@ -58,6 +58,9 @@ typedef int H5Z_filter_t; #define H5_SZIP_NN_OPTION_MASK 32 #define H5_SZIP_MAX_PIXELS_PER_BLOCK 32 +/* Current version of the H5Z_class_t struct */ +#define H5Z_CLASS_T_VERS (1) + /* Values to decide if EDC is enabled for reading data */ typedef enum H5Z_EDC_t { H5Z_ERROR_EDC = -1, /* error value */ @@ -66,6 +69,10 @@ typedef enum H5Z_EDC_t { H5Z_NO_EDC = 2 /* must be the last */ } H5Z_EDC_t; +/* Bit flags for H5Zget_filter_info */ +#define H5Z_FILTER_CONFIG_ENCODE_ENABLED (0x0001) +#define H5Z_FILTER_CONFIG_DECODE_ENABLED (0x0002) + /* Return values for filter callback function */ typedef enum H5Z_cb_return_t { H5Z_CB_ERROR = -1, @@ -77,7 +84,7 @@ typedef enum H5Z_cb_return_t { /* Filter callback function definition */ typedef H5Z_cb_return_t (*H5Z_filter_func_t)(H5Z_filter_t filter, void* buf, size_t buf_size, void* op_data); - + /* Structure for filter callback property */ typedef struct H5Z_cb_t { H5Z_filter_func_t func; @@ -157,7 +164,10 @@ typedef size_t (*H5Z_func_t)(unsigned int flags, size_t cd_nelmts, * contain a pointers to the filter function and timing statistics. */ typedef struct H5Z_class_t { + int version; /* Version number of the H5Z_class_t struct */ H5Z_filter_t id; /* Filter ID number */ + unsigned encoder_present; /* Does this filter have an encoder? */ + unsigned decoder_present; /* Does this filter have 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 */ @@ -167,7 +177,7 @@ typedef struct H5Z_class_t { H5_DLL herr_t H5Zregister(const H5Z_class_t *cls); H5_DLL herr_t H5Zunregister(H5Z_filter_t id); H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id); - +H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags); #ifdef __cplusplus } |