summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-12-15 15:04:27 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-12-15 15:04:50 -0800
commit32fef43b442c7abc70414863d64718cd06f6477a (patch)
tree959497d1ea14da206193dacd0fe8f9904cc0f34b
parentcf26200380585019e927fe3cf5c0ecb7c8b3ef14 (diff)
downloadgzip-32fef43b442c7abc70414863d64718cd06f6477a.tar.gz
doc: document gzip -l change
* NEWS, doc/gzip.texi (Invoking gzip), gzip.1 (gunzip): Document recent change.
-rw-r--r--NEWS10
-rw-r--r--doc/gzip.texi18
-rw-r--r--gzip.111
3 files changed, 10 insertions, 29 deletions
diff --git a/NEWS b/NEWS
index 9a94934..779881c 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,16 @@ GNU gzip NEWS -*- outline -*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Changes in behavior
+
+ 'gzip -l' no longer misreports file lengths 4 GiB and larger.
+ Previously, 'gzip -l' output the 32-bit value stored in the gzip
+ header even though that is the uncompressed length modulo 2**32.
+ Now, 'gzip -l' calculates the uncompressed length by decompressing
+ the data and counting the resulting bytes. Although this can take
+ much more time, nowadays the correctness pros seem to outweigh the
+ performance cons.
+
* Noteworthy changes in release 1.11 (2021-09-03) [stable]
diff --git a/doc/gzip.texi b/doc/gzip.texi
index abceb58..48b3485 100644
--- a/doc/gzip.texi
+++ b/doc/gzip.texi
@@ -300,14 +300,6 @@ ratio: compression ratio (0.0% if unknown)
uncompressed_name: name of the uncompressed file
@end example
-The uncompressed size is given as @minus{}1 for files not in @command{gzip}
-format, such as compressed @samp{.Z} files. To get the uncompressed size for
-such a file, you can use:
-
-@example
-zcat file.Z | wc -c
-@end example
-
In combination with the @option{--verbose} option, the following fields are also
displayed:
@@ -323,16 +315,6 @@ With @option{--verbose}, the size totals and compression ratio for all files
is also displayed, unless some sizes are unknown. With @option{--quiet},
the title and totals lines are not displayed.
-The @command{gzip} format represents the input size modulo
-@math{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:
-
-@example
-zcat file.gz | wc -c
-@end example
-
@item --license
@itemx -L
Display the @command{gzip} license then quit.
diff --git a/gzip.1 b/gzip.1
index 0ae9765..65dea22 100644
--- a/gzip.1
+++ b/gzip.1
@@ -492,17 +492,6 @@ detects that there is extra trailing garbage after the compressed data
and emits a warning by default. You can use the --quiet option to
suppress the warning.
.SH BUGS
-The gzip format represents the input size modulo 2^32, so the
---list option reports incorrect uncompressed sizes and compression
-ratios for uncompressed files 4 GB 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
-
-The --list option reports sizes as -1 and crc as ffffffff if the
-compressed file is on a non seekable media.
-
In some rare cases, the --best option gives worse compression than
the default compression level (-6). On some highly redundant files,
.B compress