GNU bug report logs - #42965
Wrong uncompressed size with option --list

Previous Next

Package: gzip;

Reported by: Juan Diaz <j.a.diazh <at> hotmail.com>

Date: Fri, 21 Aug 2020 08:46:02 UTC

Severity: normal

Merged with 17804, 29089, 30935, 30936, 38766, 48424, 52227

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42965 in the body.
You can then email your comments to 42965 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#42965; Package gzip. (Fri, 21 Aug 2020 08:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Juan Diaz <j.a.diazh <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Fri, 21 Aug 2020 08:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juan Diaz <j.a.diazh <at> hotmail.com>
To: bug-gzip <at> gnu.org
Subject: Wrong uncompressed size with option --list
Date: Fri, 21 Aug 2020 10:24:36 +0200
[Message part 1 (text/plain, inline)]
Hi,

I've seen that with large sized files (14G in this case) when I use the 
"list" option I get wrong uncompressed size and the ratio, of course, is 
wrong. I've tested it with versions 1.10 (last just compiled) and 1.5 
(system version).

/ # ./gzip -l  file.gz //
//         compressed        uncompressed  ratio uncompressed_name//
/

/         4937209128          1654354046 -198.4% file/

The real uncompressed size is 14539255934.

/# ./gzip -V//
//gzip 1.10//
//Copyright (C) 2018 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 <https://www.gnu.org/licenses/gpl.html>.//
//There is NO WARRANTY, to the extent permitted by law.//
//
//Written by Jean-loup Gailly./


/#ldd ./gzip //
//        linux-vdso.so.1 =>  (0x00007ffecc9f2000)//
//        libc.so.6 => /lib64/libc.so.6 (0x00007f4414ef0000)//
//        /lib64/ld-linux-x86-64.so.2 (0x00007f44152be000)/


/# file ./gzip //
//./gzip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
BuildID[sha1]=d0d1507ea734a12479a63489ea858bd997fcb716, not stripped/

Regards.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gzip <at> gnu.org:
bug#42965; Package gzip. (Fri, 21 Aug 2020 08:52:01 GMT) Full text and rfc822 format available.

Message #8 received at 42965 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Kitt <steve <at> sk2.org>
To: Juan Diaz <j.a.diazh <at> hotmail.com>
Cc: 42965 <at> debbugs.gnu.org
Subject: Re: bug#42965: Wrong uncompressed size with option --list
Date: Fri, 21 Aug 2020 10:51:37 +0200
Hi Juan,

Le 21/08/2020 10:24, Juan Diaz a écrit :
> I've seen that with large sized files (14G in this case) when I use
> the "list" option I get wrong uncompressed size and the ratio, of
> course, is wrong. I've tested it with versions 1.10 (last just
> compiled) and 1.5 (system version).

This is a known limitation, described in the gzip manpage (see the BUGS 
section):

The gzip format represents the input size modulo 2^32, so the --list 
option reports incorrect uncompressed sizes and compression ratios for 
uncompressed files 4 GB and larger.

The documented workaround is to decompress the file and measure its 
size:

    zcat file.gz | wc -c

Regards,

Stephen




Merged 17804 29089 30935 30936 38766 42965 48424 52227. Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Wed, 01 Dec 2021 23:34:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Jan 2022 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 97 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.