ddn.lib.hdf5.h5z

HDF5 Filter Binding

This module provides D bindings for HDF5 filter operations (H5Z API).

License

BSD-3-Clause

Types 11

aliasH5Z_filter_t = int

Filter identifier type

Filter identifiers

ERROR = - 1
NONE = 0
DEFLATE = 1
SHUFFLE = 2
FLETCHER32 = 3
SZIP = 4
NBIT = 5
SCALEOFFSET = 6
RESERVED = 256
MAX = 65535

Filter configuration flags

ENCODE_ENABLED = 0x0001
DECODE_ENABLED = 0x0002
enumH5Z_SZIP : uint

SZIP options

ALLOW_K13_OPTION_MASK = 1
CHIP_OPTION_MASK = 2
EC_OPTION_MASK = 4
NN_OPTION_MASK = 32
MAX_PIXELS_PER_BLOCK = 32
enumH5Z_SO : int

Scale-offset type

FLOAT_DSCALE = 0
FLOAT_ESCALE = 1
INT = 2
enumH5Z_cb_return_t : int

Filter callback return values.

ERROR = - 1Error during filter callback
FAIL = 0Filter operation failed
CONT = 1Continue with filter pipeline
NO = 2Skip this filter, not an error
aliasH5Z_filter_func_t = H5Z_cb_return_t function( H5Z_filter_t filter, void * buf, size_t buf_size, void * op_data) @nogc nothrow

Filter callback function type.

Called during filter operations to allow application intervention.

Parameters

filterFilter identifier
bufData buffer
buf_sizeSize of data buffer
op_dataUser-supplied data

Returns

H5Z_cb_return_t value indicating how to proceed.
aliasH5Z_can_apply_func_t = htri_t function( hid_t dcpl_id, hid_t type_id, hid_t space_id) @nogc nothrow

Filter "can apply" callback function type.

Called before filter is applied to check if it can be used.

Parameters

dcpl_idDataset creation property list identifier
type_idDatatype identifier
space_idDataspace identifier

Returns

Positive if filter can be applied, zero if cannot, negative on error.
aliasH5Z_set_local_func_t = herr_t function( hid_t dcpl_id, hid_t type_id, hid_t space_id) @nogc nothrow

Filter "set local" callback function type.

Called to set filter parameters for a specific dataset.

Parameters

dcpl_idDataset creation property list identifier
type_idDatatype identifier
space_idDataspace identifier

Returns

Non-negative on success, negative on failure.
aliasH5Z_func_t = size_t function( uint flags, size_t cd_nelmts, const uint * cd_values, size_t nbytes, size_t * buf_size, void * * buf) @nogc nothrow

Filter function type for the actual filtering operation.

Parameters

flagsBitfield of filter flags
cd_nelmtsNumber of elements in cd_values
cd_valuesClient data values for the filter
nbytesNumber of valid bytes in buf
buf_sizeTotal size of buf
bufPointer to pointer to buffer (may be reallocated)

Returns

Number of valid bytes in output buffer on success, 0 on failure.

Filter class structure (version 2).

Used to register custom filters with H5Zregister().

Fields
int version_Version of this struct (use H5ZCLASST_VERS)
H5Z_filter_t idFilter identifier (use values >= H5ZFILTERRESERVED)
uint encoder_presentWhether encoder is available
uint decoder_presentWhether decoder is available
const(char) * nameFilter name for debugging
H5Z_can_apply_func_t can_apply"Can apply" callback (can be NULL)
H5Z_set_local_func_t set_local"Set local" callback (can be NULL)
H5Z_func_t filterFilter function (required)

Functions 4

fnhtri_t H5Zfilter_avail(H5Z_filter_t id)Checks if filter is available
fnherr_t H5Zget_filter_info(H5Z_filter_t filter, uint * filter_config_flags)Gets filter information
fnherr_t H5Zregister(const void * cls)Registers a new filter with the HDF5 library.
fnherr_t H5Zunregister(H5Z_filter_t id)Unregisters a filter from the HDF5 library.

Variables 4

enumvarH5Z_FILTER_ALL = 0

Special filter value to operate on all filters

enumvarH5Z_CLASS_T_VERS = 2

Version number for H5Z_class2_t structure

enumvarH5Z_FLAG_REVERSE = 0x0100

Flag indicating filter is applied in reverse direction (decompression)

enumvarH5Z_FLAG_OPTIONAL = 0x0001

Flag indicating filter is optional