Function zstd_sys::ZSTD_CCtx_refCDict
source · pub unsafe extern "C" fn ZSTD_CCtx_refCDict(
cctx: *mut ZSTD_CCtx,
cdict: *const ZSTD_CDict,
) -> usize
Expand description
ZSTD_CCtx_refCDict() : Requires v1.4.0+ Reference a prepared dictionary, to be used for all future compressed frames. Note that compression parameters are enforced from within CDict, and supersede any compression parameter previously set within CCtx. The parameters ignored are labelled as “superseded-by-cdict” in the ZSTD_cParameter enum docs. The ignored parameters will be used again if the CCtx is returned to no-dictionary mode. The dictionary will remain valid for future compressed frames using same CCtx. @result : 0, or an error code (which can be tested with ZSTD_isError()). Special : Referencing a NULL CDict means “return to no-dictionary mode”. Note 1 : Currently, only one dictionary can be managed. Referencing a new dictionary effectively “discards” any previous one. Note 2 : CDict is just referenced, its lifetime must outlive its usage within CCtx.