Skip to content

Commit

Permalink
trying zstd in tst_h_zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Aug 28, 2024
1 parent 1e56080 commit a0a00c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions h5_test/tst_h_zstd.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ main()
htri_t avail = -1;
unsigned int id = H5Z_FILTER_ZSTD;
unsigned int ulevel = 1;
herr_t code;

/* Check that zstandard filter is available. */
if((avail = H5Zfilter_avail(id)) < 0) ERR;
Expand All @@ -70,6 +71,9 @@ main()
if ((propid = H5Pcreate(H5P_DATASET_CREATE)) < 0) ERR;
if (H5Pset_layout(propid, H5D_CHUNKED)) ERR;
if (H5Pset_chunk(propid, 1, dims)) ERR;
if ((code = H5Pset_filter(propid, id, H5Z_FLAG_OPTIONAL, 1, &ulevel)))
ERR;

if (H5Pset_deflate(propid, DEFLATE_LEVEL)) ERR;
if ((spaceid = H5Screate_simple(1, dims, dims)) < 0) ERR;
if ((datasetid = H5Dcreate1(grpid, VAR_BOOL_NAME, H5T_NATIVE_HBOOL,
Expand Down

0 comments on commit a0a00c3

Please sign in to comment.