Function zstd_sys::ZSTD_createCDict

source ·
pub unsafe extern "C" fn ZSTD_createCDict(
    dictBuffer: *const c_void,
    dictSize: usize,
    compressionLevel: c_int
) -> *mut ZSTD_CDict
Expand description

ZSTD_createCDict() : When compressing multiple messages / blocks using the same dictionary, it’s recommended to load it only once. ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup cost. ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only. dictBuffer can be released after ZSTD_CDict creation, because its content is copied within CDict. Consider experimental function ZSTD_createCDict_byReference() if you prefer to not duplicate dictBuffer content. Note : A ZSTD_CDict can be created from an empty dictBuffer, but it is inefficient when used to compress small data.