diff options
author | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2005-02-21 19:27:56 (GMT) |
---|---|---|
committer | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2005-02-21 19:27:56 (GMT) |
commit | 89ed8ceec247d050e6962da876443bb864f08eb5 (patch) | |
tree | d231d13b9f04937da1a1fe1cedd7f2069143a6bd /tools/lib | |
parent | f20a7939694a60c08eb59cc916abe62afcf5310a (diff) | |
download | hdf5-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/lib')
-rw-r--r-- | tools/lib/h5tools.h | 2 | ||||
-rw-r--r-- | tools/lib/h5tools_filters.c | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index be6ba36..3fae481 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -483,6 +483,8 @@ extern FILE *rawdatastream; /*output stream for raw data */ #define FLETCHER32 "CHECKSUM FLETCHER32" #define SZIP "COMPRESSION SZIP" #define NBIT "COMPRESSION NBIT" +#define SCALEOFFSET "COMPRESSION SCALEOFFSET" +#define SCALEOFFSET_MINBIT "MIN BITS" #define STORAGE_LAYOUT "STORAGE_LAYOUT" #define CONTIGUOUS "CONTIGUOUS" #define COMPACT "COMPACT" diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 863f39c..355ac14 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -53,6 +53,7 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr int have_shuffle=0; int have_fletcher=0; int have_nbit=0; + int have_scaleoffset=0; #ifdef H5_HAVE_FILTER_DEFLATE have_deflate=1; @@ -69,6 +70,9 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr #ifdef H5_HAVE_FILTER_NBIT have_nbit=1; #endif +#ifdef H5_HAVE_FILTER_SCALEOFFSET + have_scaleoffset=1; +#endif /* get information about filters */ @@ -160,6 +164,18 @@ int h5tools_canreadf(const char* name, /* object name, serves also as boolean pr return 0; } break; +/*------------------------------------------------------------------------- + * H5Z_FILTER_SCALEOFFSET + *------------------------------------------------------------------------- + */ + case H5Z_FILTER_SCALEOFFSET: + if (!have_scaleoffset) + { + if (name) + print_warning(name,"scaleoffset"); + return 0; + } + break; }/*switch*/ }/*for*/ @@ -190,6 +206,7 @@ int h5tools_can_encode( H5Z_filter_t filtn) int have_shuffle=0; int have_fletcher=0; int have_nbit=0; + int have_scaleoffset=0; unsigned int filter_config_flags; #ifdef H5_HAVE_FILTER_DEFLATE @@ -207,6 +224,9 @@ int h5tools_can_encode( H5Z_filter_t filtn) #ifdef H5_HAVE_FILTER_NBIT have_nbit=1; #endif +#ifdef H5_HAVE_FILTER_SCALEOFFSET + have_scaleoffset=1; +#endif switch (filtn) { @@ -265,6 +285,12 @@ int h5tools_can_encode( H5Z_filter_t filtn) return 0; } break; + case H5Z_FILTER_SCALEOFFSET: + if (!have_scaleoffset) + { + return 0; + } + break; }/*switch*/ return 1; |