Subject: bug#30936: closed (Re: bug#17804: RFC: fixing the 32-bit size and time limits in gzip file format)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 16 Dec 2021 02:34:02 +0000

Your bug report

#17804: gzip -l reports wrong size for decompressed files larger than 4GB

which was filed against the gzip package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
17804: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17804
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#17804: RFC: fixing the 32-bit size and time limits in gzip file format
From: Paul Eggert <[email-masked]>
To: Petr Stodůlka <[email-masked]>
Cc: [email-masked]
Date: Wed, 15 Dec 2021 18:33:12 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

On 6/18/14 15:12, Paul Eggert wrote:
> One simple way forward would be to implement what pigz -tl does, namely, 
> decompress the input stream and discard the output, but print its size.

I finally got around to implementing that suggestion:

https://git.savannah.gnu.org/cgit/gzip.git/commit/?id=cf26200380585019e927fe3cf5c0ecb7c8b3ef14
https://git.savannah.gnu.org/cgit/gzip.git/commit/?id=32fef43b442c7abc70414863d64718cd06f6477a

So I am closing this old bug report.

Subject: gzip -l reports wrong size for decompressed files larger than 4GB
From: Wolfgang Formann <[email-masked]>
To: [email-masked]
Date: Sun, 25 Mar 2018 11:15:46 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello!

I am using gzip 1.6 from openSUSE Leap 42.3 with latest patches

$ file /usr/bin/gzip
/usr/bin/gzip: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter 
/lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.0.0, BuildID[sha1]=7103d56e17e6f81a52db927e393dce601c3af0e1, stripped

There is a compressed file available at https://data.dnb.de/opendata/GND.rdf.gz which has a size of 1.232.465.678 bytes. 
Uncompressed it will have a size of 19.465.374.298

The problem is:
$ gzip -l GND.rdf.gz
          compressed        uncompressed  ratio uncompressed_name
          1232465678          2285505114  46.1% GND.rdf

This number 2285505114 is actually the lower 32 bits of the real size 19GB.
$ echo "19465374298-16*1024*1024*1024" | bc
2285505114

Such a behaviour is okay for 32-bit software, 64-bit should show correct numbers.

Thanks
Wolfgang