aboutsummaryrefslogtreecommitdiffstats
path: root/lzo
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-08-02 16:37:00 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-08-02 16:37:00 -0700
commit304ab3ccaeb7cc450e11579fcc027da7265b3394 (patch)
treefb216f4d967ecac1edf715a1fac42255c456bd03 /lzo
parent4e450f3d57faa164b4d81a7cf21e7d8572a763fb (diff)
downloadlwip-304ab3ccaeb7cc450e11579fcc027da7265b3394.tar.gz
lwip-304ab3ccaeb7cc450e11579fcc027da7265b3394.tar.xz
lwip-304ab3ccaeb7cc450e11579fcc027da7265b3394.zip
prepcore: print compression statistics
Print some basic compression statistics, so we know what we are dealing with. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'lzo')
-rw-r--r--lzo/prepcore.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lzo/prepcore.c b/lzo/prepcore.c
index 1d400670..2d452841 100644
--- a/lzo/prepcore.c
+++ b/lzo/prepcore.c
@@ -353,6 +353,12 @@ int main(int argc, char *argv[])
fwrite(out, 1, outfile_len, f) != outfile_len || fclose(f))
error("write error");
+ printf("%s: in %lu, fixed %lu, out %lu, total %lu (%lu%%)\n",
+ out_name, in_len, offset-start, outfile_len,
+ (offset-start)+outfile_len,
+ (((offset-start)+outfile_len)*100+infile_len-start-1)
+ /(infile_len-start));
+
/*
* Step 12: verify decompression
*/