GNU bug report logs - #79414
the ratio output by "gzip -l" is less than 0

Previous Next

Package: gzip;

Reported by: shi xuantong <sxt1001 <at> outlook.com>

Date: Tue, 9 Sep 2025 15:19:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#79414: closed (the ratio output by "gzip -l" is less than 0)
Date: Tue, 09 Sep 2025 18:06:04 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 9 Sep 2025 11:05:03 -0700
with message-id <3699ec8a-2d1e-4c91-808a-b722070e8098 <at> cs.ucla.edu>
and subject line Re: bug#79414: the ratio output by "gzip -l" is less than 0
has caused the debbugs.gnu.org bug report #79414,
regarding the ratio output by "gzip -l" is less than 0
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
79414: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79414
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: shi xuantong <sxt1001 <at> outlook.com>
To: "bug-gzip <at> gnu.org" <bug-gzip <at> gnu.org>
Subject: the ratio output by "gzip -l" is less than 0
Date: Tue, 9 Sep 2025 15:02:50 +0000
[Message part 3 (text/plain, inline)]
gzip's version: 1.14
OS: openEuler
compiler:gcc-12.3.1

Reproduce steps:
echo "hiasdastysjdoyiojsad7saihdsd08y8768r" | gzip >> a.gz
gzip -l a.gz

result:

[cid:b070a7f1-da0a-4210-82e6-bd96683273d1]
[Message part 4 (text/html, inline)]
[image.png (image/png, inline)]
[Message part 6 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: shi xuantong <sxt1001 <at> outlook.com>
Cc: 79414-done <at> debbugs.gnu.org
Subject: Re: bug#79414: the ratio output by "gzip -l" is less than 0
Date: Tue, 9 Sep 2025 11:05:03 -0700
A negative compression ratio is correct when gzip's compressed output is 
larger than its input.

Arguably gzip should output "-Inf%" when the input is empty and the 
compressed output is not. But that's a mere nicety.


This bug report was last modified 4 days ago.

Previous Next


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