summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dumpgentest.c
diff options
context:
space:
mode:
authorRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-21 19:27:56 (GMT)
committerRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-21 19:27:56 (GMT)
commit89ed8ceec247d050e6962da876443bb864f08eb5 (patch)
treed231d13b9f04937da1a1fe1cedd7f2069143a6bd /tools/h5dump/h5dumpgentest.c
parentf20a7939694a60c08eb59cc916abe62afcf5310a (diff)
downloadhdf5-89ed8ceec247d050e6962da876443bb864f08eb5.zip
hdf5-89ed8ceec247d050e6962da876443bb864f08eb5.tar.gz
hdf5-89ed8ceec247d050e6962da876443bb864f08eb5.tar.bz2
[svn-r10060] Purpose:
feature Description: h5dump support for scaleoffset compression Solution: Platforms tested: verbena, shanti,copper64 Misc. update:
Diffstat (limited to 'tools/h5dump/h5dumpgentest.c')
-rw-r--r--tools/h5dump/h5dumpgentest.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 23da7e8..b01d87a 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -4649,6 +4649,24 @@ static void gent_filters(void)
ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1);
assert(ret>=0);
#endif
+
+/*-------------------------------------------------------------------------
+ * scaleoffset
+ *-------------------------------------------------------------------------
+ */
+#if defined (H5_HAVE_FILTER_SCALEOFFSET)
+ /* remove the filters from the dcpl */
+ ret=H5Premove_filter(dcpl,H5Z_FILTER_ALL);
+ assert(ret>=0);
+
+ /* set the scaleoffset filter */
+ ret=H5Pset_scaleoffset(dcpl,H5Tget_size(H5T_NATIVE_INT));
+ assert(ret>=0);
+
+ ret=make_dset(fid,"scaleoffset",sid,H5T_NATIVE_INT,dcpl,buf1);
+ assert(ret>=0);
+#endif
+
/*-------------------------------------------------------------------------
* all filters
*-------------------------------------------------------------------------
@@ -4684,6 +4702,12 @@ static void gent_filters(void)
assert(ret>=0);
#endif
+#if defined (H5_HAVE_FILTER_NBIT)
+ /* set the nbit filter */
+ ret=H5Pset_nbit(dcpl);
+ assert(ret>=0);
+#endif
+
ret=make_dset(fid,"all",sid,H5T_NATIVE_INT,dcpl,buf1);
assert(ret>=0);