Function zstd_sys::ZSTD_DCtx_refPrefix [] [src]

pub unsafe extern "C" fn ZSTD_DCtx_refPrefix(
    dctx: *mut ZSTD_DCtx,
    prefix: *const c_void,
    prefixSize: usize
) -> usize

ZSTD_DCtx_refPrefix() : Reference a prefix (single-usage dictionary) for next compression job. Prefix is only used once. It must be explicitly referenced before each frame. If there is a need to use same prefix multiple times, consider embedding it into a ZSTD_DDict instead. @result : 0, or an error code (which can be tested with ZSTD_isError()). Note 1 : Adding any prefix (including NULL) invalidates any previously set prefix or dictionary Note 2 : Prefix buffer is referenced. It must outlive compression job. Note 3 : By default, the prefix is treated as raw content (ZSTD_dm_rawContent). Use ZSTD_CCtx_refPrefix_advanced() to alter dictMode. Note 4 : Referencing a raw content prefix has almost no cpu nor memory cost.