summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-29 15:41:33 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-11-29 15:41:33 (GMT)
commitd7d5fce2bc2542cc19db857f253451bb63830712 (patch)
treef7b479c43e3d002173a5f332dab6025bc62c4fba
parentbba104b0a07af9a0d86b47a9a1e37d6f93845864 (diff)
downloadhdf5-d7d5fce2bc2542cc19db857f253451bb63830712.zip
hdf5-d7d5fce2bc2542cc19db857f253451bb63830712.tar.gz
hdf5-d7d5fce2bc2542cc19db857f253451bb63830712.tar.bz2
[svn-r14304] change feature: rename compression used as %Savings
now the minus sign shows there was a DECREASE in compression percentage is calculated from per = (b-a)/a; where a= size of dataset before b = size after tested: windows, linux
-rw-r--r--tools/h5repack/h5repack_copy.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index c4b3a69..c9b9df8 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -364,7 +364,7 @@ int do_copy_objects(hid_t fidin,
if (options->verbose) {
printf("-----------------------------------------\n");
- printf(" Type Filter (Ratio) Name\n");
+ printf(" Type Filter (%%Savings) Name\n");
printf("-----------------------------------------\n");
}
@@ -666,10 +666,8 @@ int do_copy_objects(hid_t fidin,
a = dsize_in; b = dsize_out;
if (a!=0)
per = (double) (b-a)/a;
- if (per>0)
- per+=1;
- else
- per=fabs(per);
+
+ per = -per;
per *=100;
print_dataset_info(dcpl_out,travt->objs[i].name,per);