[KLUG Members] gzip -l error on large files

Adam Tauno Williams adam at morrison-ind.com
Tue Mar 1 15:30:25 EST 2005


> I get errors when I do
> gzip -l <gz file>
> on large files (over about 2 GB).  
> Instead of reporting intelligent numbers, it shows odd numbers and the
> compression doesn't make sense.
> #ls -la file.tar.gz
> -rw-r--r--    1 root     root     34626055051 Feb 16 01:16 file.tar.gz
> #gzip -l file.tar.gz
>          compressed        uncompressed  ratio uncompressed_name
>          8323617911          2662473728 -1200.5% file.tar
> I don't think the files are corrupt.
> Anybody encountered this problem before?

Yes.  I suspect gzip uses a signed 32 bit int in the calculations and it rolls
over when it overflows.  It might be worth trying out bzip.


More information about the Members mailing list