delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/03/10/06:55:46

Date: Wed, 10 Mar 1999 13:52:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Michel de Ruiter <Michel AT smr DOT nl>
cc: "'DJGPP workers'" <djgpp-workers AT delorie DOT com>
Subject: Re: your mail
In-Reply-To: <B0FEA00E82A7D1118BFB00A0CC99027821320B@ARGON>
Message-ID: <Pine.SUN.3.91.990310134021.20584E-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Wed, 10 Mar 1999, Michel de Ruiter wrote:

> This might very well be unappropriate for djgpp-workers, but as I brought
> this up here in the first place...

It is appropriate.

> First, if `-n' is given explicitly, gzip should _not_ put a filename
> in the gzipped file, whatever happens, e.g. so it could be used to get
> a really minimal filesize.

Maybe, but this should be discussed further with the maintainers of GZip
(and I'm not sure whether they exist anymore ;-).  The current behavior
existed before I did the last port: `gzip' overrides -n on DOS if the 
name of the original file cannot be reproduced from the name of the 
compressed file because some of the characters are lost (like in the case 
you presented where file.ext -> file.egz loses the two last characters of 
the extension). 

Personally, I don't see anything wrong with that, and I wonder how 13
more bytes could be a significant change in the file's size.  But anyway, 
I didn't change this behavior.

> Second, if gzip still does think it has strong reasons to put the
> original filename in the gzipped file (because the filename gets
> truncated or whatever), gunzip should also use that filename by
> default (as if `-N' was used), to be consistent.

Sorry, I don't see how this can be done.  `gzip' always by default 
records the original name, even on non-DOS systems (unless you say -n), 
and it always by default does NOT restore the original name, unless you 
say -N.  When `gunzip' sees the name, it cannot possibly know that it was 
recorded ``over the dead body'' of somebody who did say -n on DOS.  So it 
has no way of knowing whether to restore the original name or not.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019