Function zstd_safe::reset_cstream [] [src]

pub fn reset_cstream(zcs: &mut CStream, pledged_src_size: u64) -> usize

ZSTD_resetCStream()

start a new compression job, using same parameters from previous job.

This is typically useful to skip dictionary loading stage, since it will re-use it in-place..

Note that zcs must be init at least once before using ZSTD_resetCStream().

pledgedSrcSize==0 means "srcSize unknown".

If pledgedSrcSize > 0, its value must be correct, as it will be written in header, and controlled at the end.

Returns 0, or an error code (which can be tested using ZSTD_isError()) */