![]() |
NetCDF
4.9.0
|
Functions for working with filters. More...
#include "config.h"#include <stdlib.h>#include <stdio.h>#include <string.h>#include "netcdf.h"#include "netcdf_filter.h"#include "ncdispatch.h"#include "nc4internal.h"Go to the source code of this file.
Functions | |
| int | nc_def_var_blosc (int ncid, int varid, unsigned subcompressor, unsigned level, unsigned blocksize, unsigned addshuffle) |
| Turn on blosc for a variable. More... | |
| int | nc_def_var_bzip2 (int ncid, int varid, int level) |
| Turn on bzip2 compression for a variable. More... | |
| 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. More... | |
| int | nc_def_var_zstandard (int ncid, int varid, int level) |
| Turn on Zstandard compression for a variable. More... | |
| EXTERNL int | nc_inq_filter_avail (int ncid, unsigned id) |
| Test if filter is available. More... | |
| 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. More... | |
| 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. More... | |
| EXTERNL int | nc_inq_var_filter (int ncid, int varid, unsigned int *idp, size_t *nparamsp, unsigned int *params) |
| Find the first filter (if any) associated with a variable. More... | |
| EXTERNL int | nc_inq_var_filter_ids (int ncid, int varid, size_t *nfiltersp, unsigned int *ids) |
| Find the set of filters (if any) associated with a variable. More... | |
| EXTERNL int | nc_inq_var_filter_info (int ncid, int varid, unsigned int id, size_t *nparamsp, unsigned int *params) |
| Find the the param info about filter (if any) associated with a variable and with specified id. More... | |
| 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. More... | |
Functions for working with filters.
Definition in file dfilter.c.
| int nc_def_var_bzip2 | ( | int | ncid, |
| int | varid, | ||
| int | level | ||
| ) |
| 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.
| ncid | File and group ID. |
| varid | Variable ID. |
| id | Filter ID. |
| nparams | Number of filter parameters. |
| params | Filter parameters. |
| int nc_def_var_zstandard | ( | int | ncid, |
| int | varid, | ||
| int | level | ||
| ) |
Turn on Zstandard compression for a variable.
| 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). |
| 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.
| ncid | ID of file for which filter list is desired |
| id | filter id of interest |
| 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.
| 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. |
| 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.
| 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. |
| 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.
| 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. |