]>
git.ipfire.org Git - thirdparty/openssl.git/blob - crypto/comp/comp_lib.c
7 COMP_CTX
*COMP_CTX_new(meth
)
12 if ((ret
=(COMP_CTX
*)Malloc(sizeof(COMP_CTX
))) == NULL
)
14 /* ZZZZZZZZZZZZZZZZ */
17 memset(ret
,0,sizeof(COMP_CTX
));
19 if ((ret
->meth
->init
!= NULL
) && !ret
->meth
->init(ret
))
26 CRYPTO_new_ex_data(rsa_meth
,(char *)ret
,&ret
->ex_data
);
31 void COMP_CTX_free(ctx
)
34 /* CRYPTO_free_ex_data(rsa_meth,(char *)ctx,&ctx->ex_data); */
36 if (ctx
->meth
->finish
!= NULL
)
37 ctx
->meth
->finish(ctx
);
42 int COMP_compress_block(ctx
,out
,olen
,in
,ilen
)
50 if (ctx
->meth
->compress
== NULL
)
52 /* ZZZZZZZZZZZZZZZZZ */
55 ret
=ctx
->meth
->compress(ctx
,out
,olen
,in
,ilen
);
58 ctx
->compress_in
+=ilen
;
59 ctx
->compress_out
+=ret
;
64 int COMP_expand_block(ctx
,out
,olen
,in
,ilen
)
73 if (ctx
->meth
->expand
== NULL
)
75 /* ZZZZZZZZZZZZZZZZZ */
78 ret
=ctx
->meth
->expand(ctx
,out
,olen
,in
,ilen
);