mirror of
git://git.gnupg.org/gnupg.git
synced 2025-03-28 22:49:59 +01:00
* compress-bz2.c (init_compress): Compression level 0 is not meaningful
for bzip2.
This commit is contained in:
parent
964cb93108
commit
4e4a23de9e
@ -1,5 +1,8 @@
|
|||||||
2003-11-15 David Shaw <dshaw@jabberwocky.com>
|
2003-11-15 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* compress-bz2.c (init_compress): Compression level 0 is not
|
||||||
|
meaningful for bzip2.
|
||||||
|
|
||||||
* g10.c: Add --compress-level (same as -z).
|
* g10.c: Add --compress-level (same as -z).
|
||||||
|
|
||||||
2003-11-05 David Shaw <dshaw@jabberwocky.com>
|
2003-11-05 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
#include "options.h"
|
#include "options.h"
|
||||||
|
|
||||||
/* Note that the code in compress.c is nearly identical to the code
|
/* Note that the code in compress.c is nearly identical to the code
|
||||||
here, so if you fix a bug here, look there to see if the matching
|
here, so if you fix a bug here, look there to see if a matching bug
|
||||||
bug needs to be fixed. I tried to have one set of functions that
|
needs to be fixed. I tried to have one set of functions that could
|
||||||
could do ZIP, ZLIB, and BZIP2, but it became dangerously unreadable
|
do ZIP, ZLIB, and BZIP2, but it became dangerously unreadable with
|
||||||
with #ifdefs and if(algo) -dshaw */
|
#ifdefs and if(algo) -dshaw */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
|
init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
|
||||||
@ -41,12 +41,10 @@ init_compress( compress_filter_context_t *zfx, bz_stream *bzs )
|
|||||||
int rc;
|
int rc;
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
if( opt.compress >= 0 && opt.compress <= 9 )
|
if( opt.compress >= 1 && opt.compress <= 9 )
|
||||||
level = opt.compress;
|
level = opt.compress;
|
||||||
else if( opt.compress == -1 )
|
else if( opt.compress == -1 )
|
||||||
level = 6; /* no particular reason, but it seems reasonable */
|
level = 6; /* no particular reason, but it seems reasonable */
|
||||||
else if( opt.compress == 10 ) /* remove this ! */
|
|
||||||
level = 0;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_error("invalid compression level; using default level\n");
|
log_error("invalid compression level; using default level\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user