From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 05 12:11:07 2016 Received: (at submit) by debbugs.gnu.org; 5 Sep 2016 16:11:07 +0000 Received: from localhost ([127.0.0.1]:50529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgwUE-0005U1-OU for submit@debbugs.gnu.org; Mon, 05 Sep 2016 12:11:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45623) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bgqNo-0002hY-1s for submit@debbugs.gnu.org; Mon, 05 Sep 2016 05:40:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgqNh-0001HV-Pe for submit@debbugs.gnu.org; Mon, 05 Sep 2016 05:39:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RECEIVED_FROM_WINDOWS_HOST autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:35579) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgqNh-0001HO-MY for submit@debbugs.gnu.org; Mon, 05 Sep 2016 05:39:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgqNf-0002ju-AL for bug-gzip@gnu.org; Mon, 05 Sep 2016 05:39:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bgqNa-0001F1-Vc for bug-gzip@gnu.org; Mon, 05 Sep 2016 05:39:54 -0400 Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]:8727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bgqNa-0001Ej-PY for bug-gzip@gnu.org; Mon, 05 Sep 2016 05:39:50 -0400 Received: from [192.168.100.10] (unknown [78.207.162.111]) by smtp3-g21.free.fr (Postfix) with ESMTP id B01A313F8C8 for ; Mon, 5 Sep 2016 09:47:19 +0200 (CEST) From: messages JB To: bug-gzip@gnu.org Subject: Bad value of size with --list Message-ID: <03dd3d94-c475-3394-6e65-56e2d6a75eb0@free.fr> Date: Mon, 5 Sep 2016 11:39:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="------------3BCCAAF5247D65FA01936A44" X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 05 Sep 2016 12:11:06 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a multi-part message in MIME format. --------------3BCCAAF5247D65FA01936A44 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi! The size of the file restored by the option "--list" is incorrect if the=20 file is more big than 4GB. [/mnt/DATA/TEST]ll total 8184100 -rw-r--r-- 1 jacques jacques *8380511744* f=C3=A9vr. 16 2016 file.bi= n [/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 = . There is NO WARRANTY, to the extent permitted by law. Written by Jean-loup Gailly. [/mnt/DATA/TEST] best regards --------------3BCCAAF5247D65FA01936A44 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=C3=A9vr. 16=C2=A0= 2016 file.bin

[/mnt/DATA/TEST]gzip file.bin

[/mnt/DATA/TEST]gzip -l file.bin.gz
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 compressed=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 uncompressed=C2=A0 ratio uncompresse= d_name
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2490092407=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4085544448=C2=A0 = 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.=C2=A0 You may redistribute copies of it un= der 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
--------------3BCCAAF5247D65FA01936A44-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 05 21:46:02 2016 Received: (at 24371-done) by debbugs.gnu.org; 6 Sep 2016 01:46:02 +0000 Received: from localhost ([127.0.0.1]:50725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bh5Sb-0004Yh-Pi for submit@debbugs.gnu.org; Mon, 05 Sep 2016 21:46:01 -0400 Received: from mail-ua0-f181.google.com ([209.85.217.181]:35479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bh5Sa-0004YR-CG for 24371-done@debbugs.gnu.org; Mon, 05 Sep 2016 21:46:00 -0400 Received: by mail-ua0-f181.google.com with SMTP id i32so242048707uai.2 for <24371-done@debbugs.gnu.org>; Mon, 05 Sep 2016 18:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=synv3S9dHnI3YfDW+0uxCzdTLqNMy0XhwdgaRQjg4PA=; b=AsxD+NQLzTggYKdAVjiurnRWBeyHp2X+DDhXl5ORtZQIbWLk7VxgzgCdZ0Zn7ipKZP GJMaFKibu1G43xaZgdN+Yyxos3YfrHNkPd0p/f3076CaJn3qNUqnXqqkrdKYwtaJNqBt NMkrqxbfUT3CGDOamgXOW0J+6x/OB/pa8y/Ow6f3PfmY139+S58Bw0ERcIEY/JJl99LZ 5DHslAR6TkEzihiL/G2fzY9Zyn32BkAv7fQue/DH34zYiJkKkTu1eKBc4OldW17rC9yD tF9thwKL8rmWqK1+Ei3Lq0+xrPIBFoTf+uRmJRwuhsFRPQHsuY79UlvPpGPEcLZP2Cng 9o+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=synv3S9dHnI3YfDW+0uxCzdTLqNMy0XhwdgaRQjg4PA=; b=e8KZvVzplYL/F0nQ7R5mF+eDOZ3sGKteDoHAJoUBR7hQEjavUAJddghSp/83p54jFz FsrbxQKblVhe0ZY9ugffCn7mCGGestEm+gfichSs8/sFPKrOKx3NY6USuUn823BB7iI/ uRpOWD6yhf51RZCaJw6eKtj7VumMnXwfrx4rRgF4pstYVLJd+YpNxI+diZR1XkO4VQyy 8LXu9QTRdnONG1XaSXmhjdwgVsqA+F7QYuN+23xr3cKIy6EfMw6Gl5EEKrd54Khcgzwv CzWCbwPP+t1vwjBkAlHN5G1zk6yx67ssHZe8Gkf1SX4rqtdhdB0jHlfrfQ6tiZW3rrVG cfhQ== X-Gm-Message-State: AE9vXwPku46HCk6Asy5SvvMcMPGQqD4b6cb29k3AuI+67AwkMkIbV6zlCCeRPRGCoFvtEETqD+nzvG0U6YEpiA== X-Received: by 10.159.36.147 with SMTP id 19mr12514100uar.126.1473126354790; Mon, 05 Sep 2016 18:45:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.81.172 with HTTP; Mon, 5 Sep 2016 18:45:34 -0700 (PDT) In-Reply-To: <03dd3d94-c475-3394-6e65-56e2d6a75eb0@free.fr> References: <03dd3d94-c475-3394-6e65-56e2d6a75eb0@free.fr> From: Jim Meyering Date: Mon, 5 Sep 2016 18:45:34 -0700 X-Google-Sender-Auth: ZQhfk_O8xXIFqL9dkkuMozRdYz8 Message-ID: Subject: Re: bug#24371: Bad value of size with --list To: messages JB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 24371-done Cc: 24371-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On Mon, Sep 5, 2016 at 2:39 AM, messages JB 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=C3=A9vr. 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 =E2=80=98gzip=E2=80=99 format represents the input size modulo 2^3= 2, 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=E2=80=99s 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. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 06 00:57:23 2016 Received: (at 24371-done) by debbugs.gnu.org; 6 Sep 2016 04:57:23 +0000 Received: from localhost ([127.0.0.1]:50777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bh8Rn-0000YX-8F for submit@debbugs.gnu.org; Tue, 06 Sep 2016 00:57:23 -0400 Received: from mail.alumni.caltech.edu ([131.215.242.114]:30083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bh8Rl-0000YI-D8 for 24371-done@debbugs.gnu.org; Tue, 06 Sep 2016 00:57:21 -0400 Received: from [10.5.54.153] (69.145.213.194.static.bresnan.net [69.145.213.194]) (Authenticated sender: madler) by mail.alumni.caltech.edu (Postfix) with ESMTPSA id 90E3C120562; Mon, 5 Sep 2016 21:57:12 -0700 (PDT) X-DKIM: Sendmail DKIM Filter v2.8.3 mail.alumni.caltech.edu 90E3C120562 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=alumni.caltech.edu; s=enforce; t=1473137834; bh=1FyeHVSzJ5l9KbBWBD4Zs4hphNitIPJLE6NYnJTx2iM=; h=Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc: Content-Transfer-Encoding:Message-Id:References:To; b=PqhcC9S/QAm+KqJ5x5kfNvkhsGpfgxT+W1B0+/CYru2BlxgkXWS6I2sLYtn9q9P7j cNxntzqbvIh8wjEE23ZuukjNxVKJ0oKBv3FOW2atRM3OcIn5XEtpdPVcTTfxc4S44n BhsRELLrH6C5fu+w76U/6aMAcHnSlP60h0xk2usI= Subject: Re: bug#24371: Bad value of size with --list Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii From: Mark Adler In-Reply-To: Date: Mon, 5 Sep 2016 22:57:07 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <03dd3d94-c475-3394-6e65-56e2d6a75eb0@free.fr> To: Jim Meyering X-Mailer: Apple Mail (2.3124) X-MailScanner-Information-Alumni: X-Alumni-MailScanner-ID: 90E3C120562.A6A23 X-MailScanner-Alumni: No Virii found X-Spam-Status-Alumni: not spam, SpamAssassin (not cached, score=-1.1, required 5, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10) X-MailScanner-From: madler@alumni.caltech.edu X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 24371-done Cc: messages JB , 24371-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.9 (---) On Sep 5, 2016, at 7:45 PM, Jim Meyering 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 From unknown Tue Aug 19 02:52:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 04 Oct 2016 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator