added documentation

This commit is contained in:
Ed 2024-08-28 09:33:48 -06:00
parent e9b5c2fd4c
commit 3d375f1ac2
2 changed files with 18 additions and 1 deletions

View File

@ -50,7 +50,9 @@ main()
char name[MAX_NAME + 1];
htri_t avail = -1;
unsigned int id = H5Z_FILTER_ZSTD;
unsigned int ulevel = 1;
/* Check that zstandard filter is available. */
if((avail = H5Zfilter_avail(id)) < 0) ERR;
if (!avail) ERR;
@ -59,7 +61,7 @@ main()
H5P_DEFAULT)) < 0) ERR;
if ((grpid = H5Gcreate1(fileid, GRP_NAME, 0)) < 0) ERR;
/* Write an array of bools, with compression. */
/* Write an array of bools, with zstandard compression. */
dims[0] = DIM1_LEN;
if ((propid = H5Pcreate(H5P_DATASET_CREATE)) < 0) ERR;
if (H5Pset_layout(propid, H5D_CHUNKED)) ERR;

View File

@ -124,6 +124,21 @@ done:
return NC_NOERR;
}
/**
* Add filter to netCDF's list of filters for a variable.
*
* This function handles necessary filter ordering for shuffle and
* fletcher32 filters.
*
* @param var Pointer to the NC_VAR_INFO_T for a variable.
* @param id HDF5 filter ID.
* @param nparams Number of parameters in filter parameter list.
* @param params Array that holds nparams unsigned ints - the filter parameters.
* @param flags NetCDF flags about the filter.
*
* @return ::NC_NOERR on success, error code otherwise.
* @author Dennis Heimbigner
*/
int
NC4_hdf5_addfilter(NC_VAR_INFO_T* var, unsigned int id, size_t nparams, const unsigned int* params, int flags)
{