[][src]Function zstd_safe::create_cdict

pub fn create_cdict(
    dict_buffer: &[u8],
    compression_level: i32
) -> CDict<'static>

ZSTD_createCDict()

When compressing multiple messages / blocks with the same dictionary, it's recommended to load it just once.

ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.

ZSTD_CDict can be created once and used by multiple threads concurrently, as its usage is read-only.

dictBuffer can be released after ZSTD_CDict creation, as its content is copied within CDict