Function zstd_sys::ZSTD_DCtx_loadDictionary
[−]
[src]
pub unsafe extern "C" fn ZSTD_DCtx_loadDictionary(
dctx: *mut ZSTD_DCtx,
dict: *const c_void,
dictSize: usize
) -> usize
ZSTD_DCtx_loadDictionary() :
Create an internal DDict from dict buffer,
to be used to decompress next frames.
@result : 0, or an error code (which can be tested with ZSTD_isError()).
Special : Adding a NULL (or 0-size) dictionary invalidates any previous dictionary,
meaning "return to no-dictionary mode".
Note 1 : dict
content will be copied internally.
Use ZSTD_DCtx_loadDictionary_byReference()
to reference dictionary content instead.
In which case, the dictionary buffer must outlive its users.
Note 2 : Loading a dictionary involves building tables,
which has a non-negligible impact on CPU usage and latency.
Note 3 : Use ZSTD_DCtx_loadDictionary_advanced() to select
how dictionary content will be interpreted and loaded.