12 #ifndef NETCDF_FILTER_H
13 #define NETCDF_FILTER_H 1
19 #ifndef H5Z_FILTER_DEFLATE
20 #define H5Z_FILTER_DEFLATE 1
21 #define H5Z_FILTER_SHUFFLE 2
22 #define H5Z_FILTER_FLETCHER32 3
25 #ifndef H5Z_FILTER_SZIP
26 #define H5Z_FILTER_SZIP 4
27 #define H5_SZIP_ALLOW_K13_OPTION_MASK 1
28 #define H5_SZIP_CHIP_OPTION_MASK 2
29 #define H5_SZIP_EC_OPTION_MASK 4
30 #define H5_SZIP_LSB_OPTION_MASK 8
31 #define H5_SZIP_MSB_OPTION_MASK 16
32 #define H5_SZIP_NN_OPTION_MASK 32
33 #define H5_SZIP_MAX_PIXELS_PER_BLOCK 32
34 #define H5_SZIP_RAW_OPTION_MASK 128
40 #define H5_SZIP_ALL_MASKS (H5_SZIP_CHIP_OPTION_MASK|H5_SZIP_EC_OPTION_MASK|H5_SZIP_NN_OPTION_MASK)
43 #define NC_MAX_PIXELS_PER_BLOCK 32
46 #ifndef H5Z_FILTER_ZSTD
47 #define H5Z_FILTER_ZSTD 32015
49 #ifndef H5Z_FILTER_BZIP2
50 #define H5Z_FILTER_BZIP2 307
52 #ifndef H5Z_FILTER_BLOSC
53 #define H5Z_FILTER_BLOSC 32001
65 enum BLOSC_SUBCOMPRESSORS {BLOSC_LZ=0, BLOSC_LZ4=1, BLOSC_LZ4HC=2, BLOSC_SNAPPY=3, BLOSC_ZLIB=4, BLOSC_ZSTD=5};
68 #if defined(__cplusplus)
77 nc_def_var_filter(
int ncid,
int varid,
unsigned int id,
size_t nparams,
const unsigned int* parms);
81 nc_inq_var_filter(
int ncid,
int varid,
unsigned int* idp,
size_t* nparams,
unsigned int* params);
110 EXTERNL int nc_def_var_blosc(
int ncid,
int varid,
unsigned subcompressor,
unsigned level,
unsigned blocksize,
unsigned addshuffle);
111 EXTERNL int nc_inq_var_blosc(
int ncid,
int varid,
int* hasfilterp,
unsigned* subcompressorp,
unsigned* levelp,
unsigned* blocksizep,
unsigned* addshufflep);
113 #if defined(__cplusplus)
EXTERNL int nc_def_var_blosc(int ncid, int varid, unsigned subcompressor, unsigned level, unsigned blocksize, unsigned addshuffle)
Turn on blosc for a variable.
EXTERNL int nc_inq_var_filter_info(int ncid, int varid, unsigned int id, size_t *nparams, unsigned int *params)
Find the the param info about filter (if any) associated with a variable and with specified id.
EXTERNL int nc_inq_var_filter(int ncid, int varid, unsigned int *idp, size_t *nparams, unsigned int *params)
Find the first filter (if any) associated with a variable.
EXTERNL int nc_inq_var_filter_ids(int ncid, int varid, size_t *nfilters, unsigned int *filterids)
Find the set of filters (if any) associated with a variable.
#define EXTERNL
Needed for DLL build.
EXTERNL int nc_def_var_zstandard(int ncid, int varid, int level)
Turn on Zstandard compression for a variable.
EXTERNL int nc_def_var_bzip2(int ncid, int varid, int level)
Turn on bzip2 compression for a variable.
EXTERNL int nc_inq_filter_avail(int ncid, unsigned id)
Test if filter is available.
EXTERNL int nc_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams, const unsigned int *parms)
Define a new variable filter Assumes HDF5 format using unsigned ints.
EXTERNL int nc_inq_var_blosc(int ncid, int varid, int *hasfilterp, unsigned *subcompressorp, unsigned *levelp, unsigned *blocksizep, unsigned *addshufflep)
Learn whether Blosc compression is on for a variable, and, if so, the settings.
EXTERNL int nc_inq_var_bzip2(int ncid, int varid, int *hasfilterp, int *levelp)
Learn whether bzip2 compression is on for a variable, and, if so, the level setting.
EXTERNL int nc_inq_var_zstandard(int ncid, int varid, int *hasfilterp, int *levelp)
Learn whether Zstandard compression is on for a variable, and, if so, the level setting.