From 5bedb5edfe575739bca53f801d0b751e0aeb9019 Mon Sep 17 00:00:00 2001 From: "Robert E. McGrath" Date: Fri, 11 Feb 2005 14:03:41 -0500 Subject: [svn-r9989] Purpose: Feature Description: Adding support for NBIT compression to dumper Solution: Platforms tested: arabica, verbena, copper64 Misc. update: --- tools/h5dump/h5dump.c | 4 ++++ tools/h5dump/h5dumpgentest.c | 18 ++++++++++++++++++ tools/h5dump/testh5dump.sh.in | 8 ++++++++ 3 files changed, 30 insertions(+) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 6a617c7..b7974f4 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -2348,6 +2348,10 @@ dump_dcpl(hid_t dcpl_id,hid_t type_id, hid_t obj_id) printf("%s\n",END); } break; + case H5Z_FILTER_NBIT: + indentation(indent + COL); + printf("%s\n", NBIT); + break; default: indentation(indent + COL); if (H5Zfilter_avail(filtn)) diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index e438572..23da7e8 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -4632,6 +4632,24 @@ static void gent_filters(void) #endif /*------------------------------------------------------------------------- + * nbit + *------------------------------------------------------------------------- + */ +#if defined (H5_HAVE_FILTER_NBIT) + /* remove the filters from the dcpl */ + ret=H5Premove_filter(dcpl,H5Z_FILTER_ALL); + assert(ret>=0); + + /* set the checksum filter */ + ret=H5Pset_nbit(dcpl); + assert(ret>=0); + + tid=H5Tcopy(H5T_NATIVE_INT); + H5Tset_precision(tid,H5Tget_size(tid)-1); + ret=make_dset(fid,"nbit",sid,tid,dcpl,buf1); + assert(ret>=0); +#endif +/*------------------------------------------------------------------------- * all filters *------------------------------------------------------------------------- */ diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 6efc47c..215a124 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -19,6 +19,7 @@ USE_FILTER_SZIP="@USE_FILTER_SZIP@" USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@" USE_FILTER_SHUFFLE="@USE_FILTER_SHUFFLE@" USE_FILTER_FLETCHER32="@USE_FILTER_FLETCHER32@" +USE_FILTER_NBIT="@USE_FILTER_NBIT@" DUMPER=h5dump # The tool name DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary @@ -282,6 +283,13 @@ if test $USE_FILTER_FLETCHER32 != "yes"; then else TOOLTEST tfletcher32.ddl $option fi +# nbit +option="-H -p -d nbit tfilters.h5" +if test $USE_FILTER_NBIT != "yes"; then + SKIP $option +else + TOOLTEST tnbit.ddl $option +fi # all option="-H -p -d all tfilters.h5" if test $USE_FILTER_FLETCHER32 != "yes" -o $USE_FILTER_SZIP != "yes" -o $USE_FILTER_DEFLATE != "yes" -o $USE_FILTER_SHUFFLE != "yes" ; then -- cgit v0.12