From d7d5fce2bc2542cc19db857f253451bb63830712 Mon Sep 17 00:00:00 2001
From: Pedro Vicente Nunes <pvn@hdfgroup.org>
Date: Thu, 29 Nov 2007 10:41:33 -0500
Subject: [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
---
 tools/h5repack/h5repack_copy.c | 8 +++-----
 1 file 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);
-- 
cgit v0.12