GNU bug report logs -
#24371
Bad value of size with --list
Previous Next
Reported by: messages JB <messages.jb <at> free.fr>
Date: Mon, 5 Sep 2016 16:12:01 UTC
Severity: normal
Done: Jim Meyering <jim <at> meyering.net>
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 24371 in the body.
You can then email your comments to 24371 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gzip <at> gnu.org
:
bug#24371
; Package
gzip
.
(Mon, 05 Sep 2016 16:12:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
messages JB <messages.jb <at> free.fr>
:
New bug report received and forwarded. Copy sent to
bug-gzip <at> gnu.org
.
(Mon, 05 Sep 2016 16:12:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi!
The size of the file restored by the option "--list" is incorrect if the
file is more big than 4GB.
[/mnt/DATA/TEST]ll
total 8184100
-rw-r--r-- 1 jacques jacques *8380511744* févr. 16 2016 file.bin
[/mnt/DATA/TEST]gzip file.bin
[/mnt/DATA/TEST]gzip -l file.bin.gz
compressed uncompressed ratio uncompressed_name
2490092407 *4085544448* 39.1% file.bin
[/mnt/DATA/TEST]gzip -V
gzip 1.6
Copyright (C) 2007, 2010, 2011 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.
[/mnt/DATA/TEST]
best regards
[Message part 2 (text/html, inline)]
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Tue, 06 Sep 2016 01:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
messages JB <messages.jb <at> free.fr>
:
bug acknowledged by developer.
(Tue, 06 Sep 2016 01:47:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 24371-done <at> debbugs.gnu.org (full text, mbox):
On Mon, Sep 5, 2016 at 2:39 AM, messages JB <messages.jb <at> free.fr> wrote:
> Hi!
>
> The size of the file restored by the option "--list" is incorrect if the
> file is more big than 4GB.
>
> [/mnt/DATA/TEST]ll
> total 8184100
> -rw-r--r-- 1 jacques jacques *8380511744* févr. 16 2016 file.bin
>
> [/mnt/DATA/TEST]gzip file.bin
>
> [/mnt/DATA/TEST]gzip -l file.bin.gz
> compressed uncompressed ratio uncompressed_name
> 2490092407 *4085544448* 39.1% file.bin
>
> [/mnt/DATA/TEST]gzip -V
> gzip 1.6
Thanks for the report.
However, this is a known and documented limitation in the format, so
cannot be fixed in gzip. Consider using a tool with a more modern
format, like xz.
Here is the relevant part of the documentation from "info 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
Since there is nothing in gzip that can be changed to address this,
I'm closing the ticket.
Information forwarded
to
bug-gzip <at> gnu.org
:
bug#24371
; Package
gzip
.
(Tue, 06 Sep 2016 04:58:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 24371-done <at> debbugs.gnu.org (full text, mbox):
On Sep 5, 2016, at 7:45 PM, Jim Meyering <jim <at> meyering.net> wrote:
> Since there is nothing in gzip that can be changed to address this,
> I'm closing the ticket.
Well, technically there is, but it could be argued that the fix is not in the spirit of -l, i.e. not O(1) in time. The fix is that gzip could decompress the entire file without writing it, a la -t, and count the number of uncompressed bytes, which would be O(n).
pigz -l does what gzip -l does, O(1), but pigz -lt guarantees the correct uncompressed size by reading and decompressing the entire file, O(n).
Mark
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 04 Oct 2016 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.