Deprecated function - 5.2 English - 68552

AOCL API Guide (68552)

Document ID
68552
Release Date
2025-12-29
Version
5.2 English
size_t ZSTD_compress_advanced(ZSTD_CCtx* cctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize, const void* dict, size_t dictSize, ZSTD_parameters params)
Brief:

This function compresses data using custom compression parameters specified in a ZSTD_parameters structure. It supports both single-threaded and multi-threaded compression.

Parameter

Direction

Description

cctx

in, out

Explicit ZSTD compression context. When compressing many times, it is recommended to allocate the context just once and re-use it for each successive compression operation.

dst

out

Destination buffer, compressed data is kept here, memory should be allocated already.

dstCapacity

in

Size of buffer dst (which must be already allocated).

src

in

Source buffer, the data which you want to compress is copied/or pointed here.

srcSize

in

Size of buffer src.

dict

in

Dictionary buffer.

dictSize

in

Size of the dictionary buffer.

params

in

Compression parameters controlling compression level, window size, and strategy. These parameters must be initialized before calling the function.

Returns:

Result

Description

Success

The number of bytes written into dst (necessarily <= dstCapacity) on success.

Failure

An error code on failure.