Uncompressed Size a Series of GZip Files

We compress our log files using GZip.  It does a heck of a job compressing at almost 95% average.  Here's a note-to-self that others might find useful for use when trying to provide sizing information (e.g. when evaluating web analytics solutions):

  1. Run the following at a command prompt: FOR /R X:\ %G IN (*.log.gz) DO GZip -l %G >> C:\Temp\LogStats.txt
  2. Open the file in Excel
  3. Sort Column A in alphabetical order
  4. Delete the repetitive headers at the bottom of the sort
  5. Trim the content into the adjacent column(TRIM function)
  6. Paste the trimmed values back to the first column (Paste Special > Values)
  7. Split the first column using space the delimiter (Text to Columns > Delimited > Space)
  8. Add up the contents of the uncompressed column and you will have the result (SUM function)

Comments Subscribe to Post Comments Feed

Be the first to share your opinion!

Have Your Say