From 869c6bb7e455c91680bad8c2649bcfcdacfc4e7d Mon Sep 17 00:00:00 2001 From: David Shaw Date: Fri, 31 Oct 2003 05:39:02 +0000 Subject: * misc.c (compress_algo_to_string, string_to_compress_algo, check_compress_algo): Add bzip2. * compress.c (compress_filter): Make static to help force the use of push_compress_filter. Remove default algorithm setting since that is done in push_compress_filter now. * main.h: Use named algorithm. * filter.h, compress.c (push_compress_filter, push_compress_filter2): New. Figure out which is the appropriate compression filter to use, and push it into place. * compress.c (handle_compressed), encode.c (encode_simple, encode_crypt), sign.c (sign_file, sign_symencrypt_file), import.c (read_block), export.c (do_export): Use push_compress_filter instead of pushing the compression filter ourselves. * compress-bz2.c: New. Bzlib versions of the compression filter routines. * Makefile.am: Include compress-bz2.c if bz2lib is available. --- g10/encode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'g10/encode.c') diff --git a/g10/encode.c b/g10/encode.c index 05fdb6ac3..dfde96234 100644 --- a/g10/encode.c +++ b/g10/encode.c @@ -332,8 +332,7 @@ encode_simple( const char *filename, int mode, int use_seskey ) { if (cfx.dek && cfx.dek->use_mdc) zfx.new_ctb = 1; - zfx.algo=default_compress_algo(); - iobuf_push_filter( out, compress_filter, &zfx ); + push_compress_filter(out,&zfx,opt.def_compress_algo); } /* do the work */ @@ -627,8 +626,7 @@ encode_crypt( const char *filename, STRLIST remusr, int use_symkey ) { if (cfx.dek && cfx.dek->use_mdc) zfx.new_ctb = 1; - zfx.algo = compr_algo; - iobuf_push_filter( out, compress_filter, &zfx ); + push_compress_filter(out,&zfx,compr_algo); } } -- cgit