Loading...
Searching...
No Matches
netcdf_filter.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | NCPluginList

## Macros

#define | H5_SZIP_ALL_MASKS (H5_SZIP_CHIP_OPTION_MASK|H5_SZIP_EC_OPTION_MASK|H5_SZIP_NN_OPTION_MASK)
#define | H5_SZIP_ALLOW_K13_OPTION_MASK 1
#define | H5_SZIP_CHIP_OPTION_MASK 2
#define | H5_SZIP_EC_OPTION_MASK 4
#define | H5_SZIP_LSB_OPTION_MASK 8
#define | H5_SZIP_MAX_PIXELS_PER_BLOCK 32
#define | H5_SZIP_MSB_OPTION_MASK 16
#define | H5_SZIP_NN_OPTION_MASK 32
#define | H5_SZIP_RAW_OPTION_MASK 128
#define | H5Z_FILTER_BLOSC 32001
#define | H5Z_FILTER_BZIP2 307
#define | H5Z_FILTER_DEFLATE 1
#define | H5Z_FILTER_FLETCHER32 3
#define | H5Z_FILTER_SHUFFLE 2
#define | H5Z_FILTER_SZIP 4
#define | H5Z_FILTER_ZSTD 32015
#define | NC_MAX_PIXELS_PER_BLOCK 32
| The maximum allowed setting for pixels_per_block when calling nc_def_var_szip().
#define | NC_SZIP_EC 4
| Selects entropy coding method for szip.
#define | NC_SZIP_NN 32
| Selects nearest neighbor coding method for szip.

## Typedefs

typedef struct NCPluginList | NCPluginList

## Enumerations

enum | BLOSC_SHUFFLE { BLOSC_NOSHUFFLE =0 , BLOSC_SHUFFLE =1 , BLOSC_BITSHUFFLE =2 }
enum | BLOSC_SUBCOMPRESSORS { BLOSC_LZ =0 , BLOSC_LZ4 =1 , BLOSC_LZ4HC =2 , BLOSC_SNAPPY =3 , BLOSC_ZLIB =4 , BLOSC_ZSTD =5 }

## Functions

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_def_var_bzip2 (int ncid, int varid, int level)
| Turn on bzip2 compression for a variable.
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_def_var_zstandard (int ncid, int varid, int level)
| Turn on Zstandard compression for a variable.
EXTERNL int | nc_filter_path_query (int id)
EXTERNL int | nc_inq_filter_avail (int ncid, unsigned id)
| Test if filter is available.
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_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.
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_zstandard (int ncid, int varid, int *hasfilterp, int *levelp)
| Learn whether Zstandard compression is on for a variable, and, if so, the level setting.
EXTERNL int | nc_plugin_path_get (NCPluginList *dirs)
| Return the current sequence of directories in the internal global plugin path list.
EXTERNL int | nc_plugin_path_ndirs (size_t *ndirsp)
| Return the length of the current sequence of directories in the internal global plugin path list.
EXTERNL int | nc_plugin_path_set (NCPluginList *dirs)
| Empty the current internal path sequence and replace with the sequence of directories argument.

## Macro Definition Documentation

## H5_SZIP_ALL_MASKS

#define H5_SZIP_ALL_MASKS (H5_SZIP_CHIP_OPTION_MASK|H5_SZIP_EC_OPTION_MASK|H5_SZIP_NN_OPTION_MASK)

Definition at line 40 of file netcdf_filter.h.

## H5_SZIP_ALLOW_K13_OPTION_MASK

#define H5_SZIP_ALLOW_K13_OPTION_MASK 1

Definition at line 27 of file netcdf_filter.h.

## H5_SZIP_CHIP_OPTION_MASK

#define H5_SZIP_CHIP_OPTION_MASK 2

Definition at line 28 of file netcdf_filter.h.

## H5_SZIP_EC_OPTION_MASK

#define H5_SZIP_EC_OPTION_MASK 4

Definition at line 29 of file netcdf_filter.h.

## H5_SZIP_LSB_OPTION_MASK

#define H5_SZIP_LSB_OPTION_MASK 8

Definition at line 30 of file netcdf_filter.h.

## H5_SZIP_MAX_PIXELS_PER_BLOCK

#define H5_SZIP_MAX_PIXELS_PER_BLOCK 32

Definition at line 33 of file netcdf_filter.h.

## H5_SZIP_MSB_OPTION_MASK

#define H5_SZIP_MSB_OPTION_MASK 16

Definition at line 31 of file netcdf_filter.h.

## H5_SZIP_NN_OPTION_MASK

#define H5_SZIP_NN_OPTION_MASK 32

Definition at line 32 of file netcdf_filter.h.

## H5_SZIP_RAW_OPTION_MASK

#define H5_SZIP_RAW_OPTION_MASK 128

Definition at line 34 of file netcdf_filter.h.

## H5Z_FILTER_BLOSC

#define H5Z_FILTER_BLOSC 32001

Definition at line 53 of file netcdf_filter.h.

## H5Z_FILTER_BZIP2

#define H5Z_FILTER_BZIP2 307

Definition at line 50 of file netcdf_filter.h.

## H5Z_FILTER_DEFLATE

#define H5Z_FILTER_DEFLATE 1

Definition at line 20 of file netcdf_filter.h.

## H5Z_FILTER_FLETCHER32

#define H5Z_FILTER_FLETCHER32 3

Definition at line 22 of file netcdf_filter.h.

## H5Z_FILTER_SHUFFLE

#define H5Z_FILTER_SHUFFLE 2

Definition at line 21 of file netcdf_filter.h.

## H5Z_FILTER_SZIP

#define H5Z_FILTER_SZIP 4

Definition at line 26 of file netcdf_filter.h.

## H5Z_FILTER_ZSTD

#define H5Z_FILTER_ZSTD 32015

Definition at line 47 of file netcdf_filter.h.

## NC_MAX_PIXELS_PER_BLOCK

#define NC_MAX_PIXELS_PER_BLOCK 32

The maximum allowed setting for pixels_per_block when calling nc_def_var_szip().

Definition at line 43 of file netcdf_filter.h.

## NC_SZIP_EC

#define NC_SZIP_EC 4

Selects entropy coding method for szip.

Definition at line 36 of file netcdf_filter.h.

## NC_SZIP_NN

#define NC_SZIP_NN 32

Selects nearest neighbor coding method for szip.

Definition at line 37 of file netcdf_filter.h.

## Enumeration Type Documentation

## BLOSC_SHUFFLE

enum BLOSC_SHUFFLE

Definition at line 56 of file netcdf_filter.h.

## BLOSC_SUBCOMPRESSORS

enum BLOSC_SUBCOMPRESSORS

Definition at line 65 of file netcdf_filter.h.

## Function Documentation

## nc_def_var_bzip2()

EXTERNL int nc_def_var_bzip2 | ( | int | ncid,
|  | int | varid,
|  | int | level )

Turn on bzip2 compression for a variable.

Parameters

  ncid | File ID.
  varid | Variable ID.
  level | From 1 to 9. Set the block size to 100k, 200k ... 900k when compressing. (bzip2 default level is 9).

Returns
  0 for success, error code otherwise.

Author
  Dennis Heimbigner, Ed Hartnett

Definition at line 239 of file dfilter.c.

## nc_def_var_filter()

EXTERNL int nc_def_var_filter | ( | int | ncid,
|  | int | varid,
|  | unsigned int | id,
|  | size_t | nparams,
|  | const unsigned int * | params )

Define a new variable filter Assumes HDF5 format using unsigned ints.

Only variables with chunked storage can use filters.

Parameters

  ncid | File and group ID.
  varid | Variable ID.
  id | Filter ID.
  nparams | Number of filter parameters.
  params | Filter parameters.

Returns
  NC_NOERR No error.
  NC_EINVAL Variable must be chunked.
  NC_EBADID Bad ID.

Author
  Dennis Heimbigner

Definition at line 129 of file dfilter.c.

## nc_def_var_zstandard()

EXTERNL int nc_def_var_zstandard | ( | int | ncid,
|  | int | varid,
|  | int | level )

Turn on Zstandard compression for a variable.

Parameters

  ncid | File ID.
  varid | Variable ID.
  level | From -131072 to 22 (depends on Zstandard version). when compressing. Regular compression levels are from 1 up to 19. Use levels >= 20, labeled --ultra, cautiously: they require more memory. Negative compression levels that extend the range of speed vs. ratio preferences. The lower the level, the faster the speed (at the cost of compression).

Returns
  0 for success, error code otherwise.

Author
  Charlie Zender, Dennis Heimbigner, Ed Hartnett

Definition at line 307 of file dfilter.c.

## nc_inq_filter_avail()

EXTERNL int nc_inq_filter_avail | ( | int | ncid,
|  | unsigned | id )

Test if filter is available.

Would prefer returning a list of all available filters, but HDF5 does not support that capability.

Parameters

  ncid | ID of file for which filter list is desired
  id | filter id of interest

Returns
  NC_NOERR if the filter is available
  NC_EBADID if ncid is invalid
  NC_ENOFILTER if filter is not available.

Author
  Dennis Heimbigner

Definition at line 212 of file dfilter.c.

## nc_inq_var_blosc()

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.

Parameters

  ncid | File ID.
  varid | Variable ID.
  hasfilterp | Pointer that gets a 0 if blosc is not in use for this var, and a 1 if it is. Ignored if NULL.
  subcompressorp | Pointer that gets the subcompressor, if blosc is in use. Ignored if NULL.
  levelp | Pointer that gets the level setting, if blosc is in use. Ignored if NULL.
  blocksizep | Pointer that gets the block size, if blosc is in use. Ignored if NULL.
  addshufflep | Pointer that gets non-zero value if shuffle is in use, if blosc is in use. Ignored if NULL.

Returns
  0 for success, error code otherwise.

Author
  Dennis Heimbigner

Definition at line 434 of file dfilter.c.

## nc_inq_var_bzip2()

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.

Parameters

  ncid | File ID.
  varid | Variable ID.
  hasfilterp | Pointer that gets a 0 if bzip2 is not in use for this var, and a 1 if it is. Ignored if NULL.
  levelp | Pointer that gets the level setting (from 1 to 9), if bzip2 is in use. Ignored if NULL.

Returns
  0 for success, error code otherwise.

Author
  Dennis Heimbigner, Ed Hartnett

Definition at line 270 of file dfilter.c.

## nc_inq_var_zstandard()

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.

Parameters

  ncid | File ID.
  varid | Variable ID.
  hasfilterp | Pointer that gets a 0 if Zstandard is not in use for this var, and a 1 if it is. Ignored if NULL.
  levelp | Pointer that gets the level setting (from -131072 to 22), if Zstandard is in use. Ignored if NULL.

Returns
  0 for success, error code otherwise.

Author
  Charlie Zender, Dennis Heimbigner, Ed Hartnett

Definition at line 343 of file dfilter.c.

## nc_plugin_path_get()

EXTERNL int nc_plugin_path_get | ( | NCPluginList * | dirs | ) |

Return the current sequence of directories in the internal global plugin path list.

Since this function does not modify the plugin path, it can be called at any time.

Parameters

  dirs | pointer to an NCPluginList object

Returns
  NC_NOERR | NC_EXXX

Author
  Dennis Heimbigner

WARNING: if dirs->dirs is NULL, then space for the directory vector will be allocated. If not NULL, then the specified space will be overwritten with the vector.

Author
  : Dennis Heimbigner

## nc_plugin_path_ndirs()

EXTERNL int nc_plugin_path_ndirs | ( | size_t * | ndirsp | ) |

Return the length of the current sequence of directories in the internal global plugin path list.

Parameters

  ndirsp | length is returned here

Returns
  NC_NOERR | NC_EXXX

Author
  Dennis Heimbigner

## nc_plugin_path_set()

EXTERNL int nc_plugin_path_set | ( | NCPluginList * | dirs | ) |

Empty the current internal path sequence and replace with the sequence of directories argument.

Using a paths argument of NULL or npaths argument of 0 will clear the set of plugin paths.

Parameters

  dirs | pointer to an NCPluginList object containing the number and vector of directory paths

Returns
  NC_NOERR | NC_EXXX

Author
  Dennis Heimbigner