gzip -l does not deal correctly with large files

View: New views
2 Messages — Rating Filter:   Alert me  

gzip -l does not deal correctly with large files

by Knappke, Christian :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I used gzip to compress a database backup file.
Afterwards gzip -l says:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gzip -l compressed_file.gz
         compressed        uncompressed  ratio uncompressed_name
          869130362           411041792 -111.4% compressed_file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
which is nonsense.

The real uncompressed size is:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gzip -c -d compressed_file.gz | wc -c
4706009088
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I use the following gzip release on Windows XP professional:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> gzip -V
gzip 1.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Best regards
Christian

________________________________
Christian Knappke
Senior Support Consultant
Active Global Support - Technology
SAP AG
Dietmar-Hopp-Allee 16
D-69190 Walldorf
T   +49 6227 7-45651
F   +49 6227 7-823426
mailto:christian.knappke@...
http://www.sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/CEO), Léo Apotheker (stellvertretender Sprecher/Deputy CEO), Werner Brandt, Claus Heinrich, Gerhard Oswald, Peter Zencke
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner,
Registergericht/Commercial Register Mannheim No HRB 350269

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation.




Re: gzip -l does not deal correctly with large files

by Paul Eggert :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The gzip documentation says:

The @command{gzip} format represents the input size modulo
@math{2^32}, so the uncompressed size and compression ratio are listed
incorrectly for uncompressed files 4 GiB and larger.  To work around
this problem, you can use the following command to discover a large
uncompressed file's true size:

@example
zcat file.gz | wc -c
@end example


LightInTheBox - Buy quality products at wholesale price!