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

Name

Description

ctx

Compression context.

out

Output buffer for compressed data.

olen

Capacity of out in bytes.

in

Input data to compress.

ilen

Length of in in bytes.

Created with MrDocs