mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-11 21:48:50 +01:00
* compress.c (init_compress): Remove compress level 10 trick, since it is
no longer needed. * g10.c: Fix typoed option name. * compress-bz2.c (init_compress): Compression level 0 is not meaningful for bzip2.
This commit is contained in:
parent
995d712589
commit
2e4ab6c669
@ -1,5 +1,13 @@
|
||||
2003-11-15 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* compress.c (init_compress): Remove compress level 10 trick,
|
||||
since it is no longer needed.
|
||||
|
||||
* g10.c: Fix typoed option name.
|
||||
|
||||
* compress-bz2.c (init_compress): Compression level 0 is not
|
||||
meaningful for bzip2.
|
||||
|
||||
* options.h, g10.c (main), compress.c (init_compress),
|
||||
compress-bz2.c (init_compress): Add --compress-level and
|
||||
--bzip2-compress-level. -z sets them both. Change various
|
||||
|
@ -41,12 +41,10 @@ init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
|
||||
int rc;
|
||||
int level;
|
||||
|
||||
if( opt.bz2_compress_level >= 0 && opt.bz2_compress_level <= 9 )
|
||||
if( opt.bz2_compress_level >= 1 && opt.bz2_compress_level <= 9 )
|
||||
level = opt.bz2_compress_level;
|
||||
else if( opt.bz2_compress_level == -1 )
|
||||
level = 6; /* no particular reason, but it seems reasonable */
|
||||
else if( opt.bz2_compress_level == 10 ) /* remove this ! */
|
||||
level = 0;
|
||||
else
|
||||
{
|
||||
log_error("invalid compression level; using default level\n");
|
||||
|
@ -64,14 +64,11 @@ init_compress( compress_filter_context_t *zfx, z_stream *zs )
|
||||
level = opt.compress_level;
|
||||
else if( opt.compress_level == -1 )
|
||||
level = Z_DEFAULT_COMPRESSION;
|
||||
else if( opt.compress_level == 10 ) /* remove this ! */
|
||||
level = 0;
|
||||
else {
|
||||
log_error("invalid compression level; using default level\n");
|
||||
level = Z_DEFAULT_COMPRESSION;
|
||||
}
|
||||
|
||||
|
||||
if( (rc = zfx->algo == 1? deflateInit2( zs, level, Z_DEFLATED,
|
||||
-13, 8, Z_DEFAULT_STRATEGY)
|
||||
: deflateInit( zs, level )
|
||||
|
@ -422,7 +422,7 @@ static ARGPARSE_OPTS opts[] = {
|
||||
{ oUser, "local-user",2, N_("use this user-id to sign or decrypt")},
|
||||
{ oCompress, NULL, 1, N_("|N|set compress level N (0 disables)") },
|
||||
{ oCompressLevel, "compress-level", 1, "@" },
|
||||
{ oBZ2CompressLevel, "bz2-compress-level", 1, "@" },
|
||||
{ oBZ2CompressLevel, "bzip2-compress-level", 1, "@" },
|
||||
{ oTextmodeShort, NULL, 0, "@"},
|
||||
{ oTextmode, "textmode", 0, N_("use canonical text mode")},
|
||||
{ oNoTextmode, "no-textmode", 0, "@"},
|
||||
|
Loading…
Reference in New Issue
Block a user