diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-11-29 15:41:33 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-11-29 15:41:33 (GMT) |
commit | d7d5fce2bc2542cc19db857f253451bb63830712 (patch) | |
tree | f7b479c43e3d002173a5f332dab6025bc62c4fba /tools/h5repack | |
parent | bba104b0a07af9a0d86b47a9a1e37d6f93845864 (diff) | |
download | hdf5-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
Diffstat (limited to 'tools/h5repack')
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 8 |
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); |