GNU bug report logs -
#15315
How to remove date in a gz file?
Previous Next
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.
Full log
Message #8 received at 15315 <at> debbugs.gnu.org (full text, mbox):
[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)]
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.