GNU bug report logs - #38766
bug: "gzip -l" truncates reported decompressed size to 32 bits

Previous Next

Package: gzip;

Reported by: Jason Mancini <jayrusman <at> hotmail.com>

Date: Fri, 27 Dec 2019 23:19:01 UTC

Severity: normal

Merged with 17804, 29089, 30935, 30936, 42965, 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 38766 in the body.
You can then email your comments to 38766 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#38766; Package gzip. (Fri, 27 Dec 2019 23:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jason Mancini <jayrusman <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Fri, 27 Dec 2019 23:19:01 GMT) Full text and rfc822 format available.

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

From: Jason Mancini <jayrusman <at> hotmail.com>
To: "bug-gzip <at> gnu.org" <bug-gzip <at> gnu.org>
Subject: bug: "gzip -l" truncates reported decompressed size to 32 bits
Date: Fri, 27 Dec 2019 20:35:13 +0000
As title states.

openSUSE Tumbleweed 20191216 (x86_64)
gzip 1.10

(Number delimiters manually added for clarity below.)

# zcat backup.bin.gz | wc -c
67,645,849,600
# gzip -l backup.bin.gz
compressed        uncompressed  ratio uncompressed_name
9,458,450,396    3,221,340,160 -193.6% backup.bin
#

67,645,849,600 => 0xf_c001_c000 => truncate => 0xc001_c000 => 3,221,340,160

Thanks!
Jason Mancini




Information forwarded to bug-gzip <at> gnu.org:
bug#38766; Package gzip. (Sat, 28 Dec 2019 16:37:02 GMT) Full text and rfc822 format available.

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

From: Antonio Diaz Diaz <antonio <at> gnu.org>
To: Jason Mancini <jayrusman <at> hotmail.com>
Cc: 38766 <at> debbugs.gnu.org
Subject: Re: bug#38766: bug: "gzip -l" truncates reported decompressed size
 to 32 bits
Date: Sat, 28 Dec 2019 17:36:44 +0100
Jason Mancini wrote:
> # zcat backup.bin.gz | wc -c
> 67,645,849,600
> # gzip -l backup.bin.gz
> compressed        uncompressed  ratio uncompressed_name
> 9,458,450,396    3,221,340,160 -193.6% backup.bin

This is a known limitation of the gzip format, and is documented in the manual:

http://www.gnu.org/software/gzip/manual/gzip.html#Invoking-gzip

"The gzip format represents the input size modulo 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:
zcat file.gz | wc -c"


Best regards,
Antonio.





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 102 days ago.

Previous Next


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