Date: Wed, 10 Mar 1999 13:52:40 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Michel de Ruiter cc: "'DJGPP workers'" Subject: Re: your mail In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.