GNU bug report logs - #15315
How to remove date in a gz file?

Previous Next

Package: gzip;

Reported by: Peng Yu <pengyu.ut <at> gmail.com>

Date: Mon, 9 Sep 2013 22:19:01 UTC

Severity: normal

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

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 15315 in the body.
You can then email your comments to 15315 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gzip <at> gnu.org:
bug#15315; Package gzip. (Mon, 09 Sep 2013 22:19:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peng Yu <pengyu.ut <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gzip <at> gnu.org. (Mon, 09 Sep 2013 22:19:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peng Yu <pengyu.ut <at> gmail.com>
To: bug-gzip <at> gnu.org
Subject: How to remove date in a gz file?
Date: Mon, 9 Sep 2013 17:18:10 -0500
Hi,

~/linux/test/gnu/gzip/gzip$ file test1.txt.gz
test1.txt.gz: gzip compressed data, was "test1.txt", from Unix, last
modified: Tue Apr 30 08:16:41 2013

.gz files have the date information if it is not created with the
option '-n'. I'm wondering what is the most efficient way to remove
the date information. (One easy way is gunzip the file and then gzip
it with '-n', but when the file is large, it might take a long time.)
I'd imagine there should be a way to directly change the .gz file to
remove the date info. But I have not found a way to do. Does anybody
know a way? Thanks.

-- 
Regards,
Peng




Information forwarded to bug-gzip <at> gnu.org:
bug#15315; Package gzip. (Tue, 10 Sep 2013 15:45:06 GMT) Full text and rfc822 format available.

Message #8 received at 15315 <at> debbugs.gnu.org (full text, mbox):

From: Tomas Härdin <tomas.hardin <at> codemill.se>
To: Peng Yu <pengyu.ut <at> gmail.com>
Cc: 15315 <at> debbugs.gnu.org
Subject: Re: bug#15315: How to remove date in a gz file?
Date: Tue, 10 Sep 2013 10:04:50 +0200
[Message part 1 (text/plain, inline)]
On Mon, 2013-09-09 at 17:18 -0500, Peng Yu wrote:
> Hi,
> 
> ~/linux/test/gnu/gzip/gzip$ file test1.txt.gz
> test1.txt.gz: gzip compressed data, was "test1.txt", from Unix, last
> modified: Tue Apr 30 08:16:41 2013
> 
> .gz files have the date information if it is not created with the
> option '-n'. I'm wondering what is the most efficient way to remove
> the date information. (One easy way is gunzip the file and then gzip
> it with '-n', but when the file is large, it might take a long time.)
> I'd imagine there should be a way to directly change the .gz file to
> remove the date info. But I have not found a way to do. Does anybody
> know a way? Thanks.

Judging by [1] and vbindiff:ing two files with and without -n, zeroing
bytes 4..7 should be enough (assuming the file only has one member).

/Tomas

[1] http://www.gzip.org/zlib/rfc-gzip.html
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 15315 <at> debbugs.gnu.org and Peng Yu <pengyu.ut <at> gmail.com> Request was from Paul Eggert <eggert <at> cs.ucla.edu> to control <at> debbugs.gnu.org. (Sat, 07 Jun 2014 22:22:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 06 Jul 2014 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 356 days ago.

Previous Next


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