summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_parse.c
diff options
context:
space:
mode:
authorRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-23 17:52:03 (GMT)
committerRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-02-23 17:52:03 (GMT)
commitfedd036348a6fa1f60bc1af3760ff34e2a47adaa (patch)
tree646943e0abeb7d66f44431cb07a9c2d6f6059e6b /tools/h5repack/h5repack_parse.c
parent0b83fea12571ae1f05e6465d4afc09948486e17f (diff)
downloadhdf5-fedd036348a6fa1f60bc1af3760ff34e2a47adaa.zip
hdf5-fedd036348a6fa1f60bc1af3760ff34e2a47adaa.tar.gz
hdf5-fedd036348a6fa1f60bc1af3760ff34e2a47adaa.tar.bz2
[svn-r10067] Purpose:
feature Description: h5repack support for scaleoffset compression Checking in early to help debug the filter. Solution: Added messages and command line to handle new scale offset filter. Note: TESTS ARE DISABLED FOR NOW. The filter is not complete, repack tests may fail due to know problems. PLEASE DO NOT MESS WITH THE SCALEOFFSET TESTS AT THIS TIME. They will be enabled when the filter is ready. Platforms tested: verbena,copper,shanti Misc. update: MANIFEST
Diffstat (limited to 'tools/h5repack/h5repack_parse.c')
-rw-r--r--tools/h5repack/h5repack_parse.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index 9cd9b7d..1fd61ca 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -35,6 +35,7 @@
* SHUF, to apply the HDF5 shuffle filter
* FLET, to apply the HDF5 checksum filter
* NBIT, to apply the HDF5 NBIT filter (NBIT compression)
+ * S+O, to apply the HDF5 scale+offset filter (compression)
* NONE, to remove the filter
*
* Examples:
@@ -284,6 +285,19 @@ obj_list_t* parse_filter(const char *str,
exit(1);
}
}
+/*-------------------------------------------------------------------------
+ * H5Z_FILTER_SCALEOFFSET
+ *-------------------------------------------------------------------------
+ */
+ else if (strcmp(scomp,"S+O")==0)
+ {
+ filt->filtn=H5Z_FILTER_SCALEOFFSET;
+ if (no_param) { /*no more parameters, S+O must have parameter */
+ if (obj_list) free(obj_list);
+ printf("Input Error: Missing compression parameter in <%s>\n",str);
+ exit(1);
+ }
+ }
else {
if (obj_list) free(obj_list);
printf("Input Error: Invalid filter type in <%s>\n",str);
@@ -327,6 +341,13 @@ obj_list_t* parse_filter(const char *str,
exit(1);
}
break;
+ case H5Z_FILTER_SCALEOFFSET:
+ if (filt->cd_values[0]<0 ){
+ if (obj_list) free(obj_list);
+ printf("Input Error: Invalid compression parameter in <%s>\n",str);
+ exit(1);
+ }
+ break;
};
return obj_list;
@@ -357,6 +378,8 @@ const char* get_sfilter(H5Z_filter_t filtn)
return "FLETCHER32";
else if (filtn==H5Z_FILTER_NBIT)
return "NBIT";
+ else if (filtn==H5Z_FILTER_SCALEOFFSET)
+ return "S+O";
else {
printf("Input error in filter type\n");
exit(1);