7 COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
11 if ((ret=(COMP_CTX *)Malloc(sizeof(COMP_CTX))) == NULL)
13 /* ZZZZZZZZZZZZZZZZ */
16 memset(ret,0,sizeof(COMP_CTX));
18 if ((ret->meth->init != NULL) && !ret->meth->init(ret))
25 CRYPTO_new_ex_data(rsa_meth,(char *)ret,&ret->ex_data);
30 void COMP_CTX_free(COMP_CTX *ctx)
32 /* CRYPTO_free_ex_data(rsa_meth,(char *)ctx,&ctx->ex_data); */
37 if (ctx->meth->finish != NULL)
38 ctx->meth->finish(ctx);
43 int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
44 unsigned char *in, int ilen)
47 if (ctx->meth->compress == NULL)
49 /* ZZZZZZZZZZZZZZZZZ */
52 ret=ctx->meth->compress(ctx,out,olen,in,ilen);
55 ctx->compress_in+=ilen;
56 ctx->compress_out+=ret;
61 int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
62 unsigned char *in, int ilen)
66 if (ctx->meth->expand == NULL)
68 /* ZZZZZZZZZZZZZZZZZ */
71 ret=ctx->meth->expand(ctx,out,olen,in,ilen);