mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* misc.c (compress_algo_to_string, check_compress_algo): Add bzip2.
* g10.c (main): Add read-only warning. * 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.
This commit is contained in:
parent
5c8f990e85
commit
ef3f432bc5
12 changed files with 360 additions and 47 deletions
19
g10/sign.c
19
g10/sign.c
|
@ -773,10 +773,7 @@ sign_file( STRLIST filenames, int detached, STRLIST locusr,
|
|||
|
||||
/* algo 0 means no compression */
|
||||
if( compr_algo )
|
||||
{
|
||||
zfx.algo = compr_algo;
|
||||
iobuf_push_filter( out, compress_filter, &zfx );
|
||||
}
|
||||
push_compress_filter(out,&zfx,compr_algo);
|
||||
}
|
||||
|
||||
/* Write the one-pass signature packets if needed */
|
||||
|
@ -1096,19 +1093,7 @@ sign_symencrypt_file (const char *fname, STRLIST locusr)
|
|||
|
||||
/* Push the Zip filter */
|
||||
if (opt.compress)
|
||||
{
|
||||
int compr_algo=opt.def_compress_algo;
|
||||
|
||||
/* Default */
|
||||
if(compr_algo==-1)
|
||||
compr_algo=DEFAULT_COMPRESS_ALGO;
|
||||
|
||||
if (compr_algo)
|
||||
{
|
||||
zfx.algo = compr_algo;
|
||||
iobuf_push_filter( out, compress_filter, &zfx );
|
||||
}
|
||||
}
|
||||
push_compress_filter(out,&zfx,opt.def_compress_algo);
|
||||
|
||||
/* Write the one-pass signature packets */
|
||||
/*(current filters: zip - encrypt - armor)*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue