aboutsummaryrefslogtreecommitdiffstats
path: root/g10/compress.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-11-15 22:31:58 +0000
committerDavid Shaw <[email protected]>2003-11-15 22:31:58 +0000
commit995d71258998eb6ed80a08cb5ad8c8bd03f13afb (patch)
tree486e8ad5b1e39f5c2063d82f5555a395be86f4a8 /g10/compress.c
parent* encode.c (encode_simple), sign.c (sign_symencrypt_file): Properly use (diff)
downloadgnupg-995d71258998eb6ed80a08cb5ad8c8bd03f13afb.tar.gz
gnupg-995d71258998eb6ed80a08cb5ad8c8bd03f13afb.zip
* 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 callers.
Diffstat (limited to 'g10/compress.c')
-rw-r--r--g10/compress.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/g10/compress.c b/g10/compress.c
index 80878835a..c4282155a 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -20,7 +20,7 @@
*/
/* Note that the code in compress-bz2.c is nearly identical to the
- code here, so if you fix a bug here, look there to see if the
+ code here, so if you fix a bug here, look there to see if a
matching bug needs to be fixed. I tried to have one set of
functions that could do ZIP, ZLIB, and BZIP2, but it became
dangerously unreadable with #ifdefs and if(algo) -dshaw */
@@ -60,11 +60,11 @@ init_compress( compress_filter_context_t *zfx, z_stream *zs )
zlib_initialized = riscos_load_module("ZLib", zlib_path, 1);
#endif
- if( opt.compress >= 0 && opt.compress <= 9 )
- level = opt.compress;
- else if( opt.compress == -1 )
+ if( opt.compress_level >= 0 && opt.compress_level <= 9 )
+ level = opt.compress_level;
+ else if( opt.compress_level == -1 )
level = Z_DEFAULT_COMPRESSION;
- else if( opt.compress == 10 ) /* remove this ! */
+ else if( opt.compress_level == 10 ) /* remove this ! */
level = 0;
else {
log_error("invalid compression level; using default level\n");
@@ -347,6 +347,9 @@ push_compress_filter2(IOBUF out,compress_filter_context_t *zfx,
switch(zfx->algo)
{
+ case COMPRESS_ALGO_NONE:
+ break;
+
case COMPRESS_ALGO_ZIP:
case COMPRESS_ALGO_ZLIB:
iobuf_push_filter2(out,compress_filter,zfx,rel);