zstd_sys

Function ZSTD_initCStream

source
pub unsafe extern "C" fn ZSTD_initCStream(
    zcs: *mut ZSTD_CStream,
    compressionLevel: c_int,
) -> usize
Expand description

Equivalent to:

ZSTD_CCtx_reset(zcs, ZSTD_reset_session_only);
ZSTD_CCtx_refCDict(zcs, NULL); // clear the dictionary (if any)
ZSTD_CCtx_setParameter(zcs, ZSTD_c_compressionLevel, compressionLevel);

Note that ZSTD_initCStream() clears any previously set dictionary. Use the new API to compress with a dictionary.