emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32903: closed ([PATCH] Display uncompressed size when testing)


From: GNU bug Tracking System
Subject: bug#32903: closed ([PATCH] Display uncompressed size when testing)
Date: Wed, 30 Mar 2022 00:15:02 +0000

Your message dated Tue, 29 Mar 2022 17:14:27 -0700
with message-id <07dc3a18-a9c0-c58c-7036-5f680b25dd09@cs.ucla.edu>
and subject line Re: [PATCH] Display uncompressed size when testing
has caused the debbugs.gnu.org bug report #32903,
regarding [PATCH] Display uncompressed size when testing
to be marked as done.

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


-- 
32903: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32903
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Display uncompressed size when testing Date: Tue, 2 Oct 2018 08:49:29 +0200
Alongside the OK message, print the real size in bytes; this provides
a way to view the stored file's size when it's larger than 4GiB.

Signed-off-by: Stephen Kitt <steve@sk2.org>
---
 gzip.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gzip.c b/gzip.c
index e6a7761..4104472 100644
--- a/gzip.c
+++ b/gzip.c
@@ -62,6 +62,7 @@ static char const *const license_msg[] = {
 #include <stddef.h>
 #include <sys/stat.h>
 #include <errno.h>
+#include <inttypes.h>
 
 #include "tailor.h"
 #include "gzip.h"
@@ -807,7 +808,7 @@ local void treat_stdin()
 
     if (verbose) {
         if (test) {
-            fprintf(stderr, " OK\n");
+            fprintf(stderr, " OK (%jd bytes)\n", (intmax_t) bytes_out);
 
         } else if (!decompress) {
             display_ratio(bytes_in-(bytes_out-header_bytes), bytes_in, stderr);
@@ -1060,7 +1061,7 @@ local void treat_file(iname)
     /* Display statistics */
     if(verbose) {
         if (test) {
-            fprintf(stderr, " OK");
+            fprintf(stderr, " OK (%jd bytes)", (int_max_t) bytes_out);
         } else if (decompress) {
             display_ratio(bytes_out-(bytes_in-header_bytes), bytes_out,stderr);
         } else {
-- 
2.11.0




--- End Message ---
--- Begin Message --- Subject: Re: [PATCH] Display uncompressed size when testing Date: Tue, 29 Mar 2022 17:14:27 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 We've recently changed 'gzip -l' so that it displays the correct uncompressed size, and this change should appear in the next gzip release.

As that seemed to be the primary motivation for suggesting 'gzip -t' to display the size, I'm taking the liberty of closing Bug#32903 dated 2018-10-02.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]