diff --git a/g10/ChangeLog b/g10/ChangeLog index 7577b9273..38f446c39 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,13 @@ 2003-11-15 David Shaw + * 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 diff --git a/g10/compress-bz2.c b/g10/compress-bz2.c index d1ad7326e..a81288e44 100644 --- a/g10/compress-bz2.c +++ b/g10/compress-bz2.c @@ -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"); diff --git a/g10/compress.c b/g10/compress.c index c4282155a..3a027e57c 100644 --- a/g10/compress.c +++ b/g10/compress.c @@ -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 ) diff --git a/g10/g10.c b/g10/g10.c index 69e3a1b49..6509b3e0e 100644 --- a/g10/g10.c +++ b/g10/g10.c @@ -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, "@"},