Subject: bug#38766: bug: "gzip -l" truncates reported decompressed size to 32 bits

From: Antonio Diaz Diaz <[email-masked]>
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.