From 304ab3ccaeb7cc450e11579fcc027da7265b3394 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 2 Aug 2009 16:37:00 -0700 Subject: prepcore: print compression statistics Print some basic compression statistics, so we know what we are dealing with. Signed-off-by: H. Peter Anvin --- lzo/prepcore.c | 6 ++++++ 1 file changed, 6 insertions(+) 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 */ -- cgit v1.2.1