"gzip" quietly ignores -# and -q options

Rob Landley rob at landley.net
Fri Mar 3 20:42:36 UTC 2006


On Friday 03 March 2006 1:23 pm, Robert P. J. Day wrote:
>   gzip.c accepts both the -# and -q options and quietly ignores them.
> IMHO, this is unacceptably misleading -- unrecognized options should
> generate at least a warning that they are being ignored, no?

Depends on the option.  The above -d is ignored, but that's actually 100% 
correct in that case.  Busybox mount ignores -v (verbose mode) because we 
haven't got one, but somebody supplying -v is no reason to die with a usage 
message.

Considering the function of gunzip -q is to suppress all warnings, emitting a 
warning about it being ignored would be highly amusing.

I don't see -# but if you mean we ignore 1-9, all the compression levels are 
functionally equivalent (produce compatible data files, it's just a question 
of how far to follow the match chains before considering the "best match" to 
have been found.  That's essentially advisory, we always follow match chains 
a long way (-9) to find the best match we can, which takes more CPU but 
results in the smallest output, which is kind of the point of an archiver 
program.  These days even embedded CPUs are fast enough that's not a major 
downside, it dates from the days where the screaming fast machines had 2 
digit MHZ ratings.

> rday

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list