COMP_compress_block

Compress a block of data.

Synopsis

Declared in <openssl/comp.h>

int
COMP_compress_block(
    COMP_CTX* ctx,
    unsigned char* out,
    int olen,
    unsigned char* in,
    int ilen);

Return Value

Number of bytes written to out, or -1 on error.

Parameters

NameDescription
ctxCompression context.
outOutput buffer for compressed data.
olenCapacity of out in bytes.
inInput data to compress.
ilenLength of in in bytes.