Function zstd_sys::ZSTD_compress_generic [] [src]

pub unsafe extern "C" fn ZSTD_compress_generic(
    cctx: *mut ZSTD_CCtx,
    output: *mut ZSTD_outBuffer,
    input: *mut ZSTD_inBuffer,
    endOp: ZSTD_EndDirective
) -> usize

ZSTD_compress_generic() : Behave about the same as ZSTD_compressStream. To note : - Compression parameters are pushed into CCtx before starting compression, using ZSTD_CCtx_setParameter() - Compression parameters cannot be changed once compression is started. - outpot->pos must be <= dstCapacity, input->pos must be <= srcSize - outpot->pos and input->pos will be updated. They are guaranteed to remain below their respective limit. - @return provides the minimum amount of data still to flush from internal buffers or an error code, which can be tested using ZSTD_isError(). if @return != 0, flush is not fully completed, there is some data left within internal buffers. - after a ZSTD_e_end directive, if internal buffer is not fully flushed, only ZSTD_e_end or ZSTD_e_flush operations are allowed. It is necessary to fully flush internal buffers before starting a new compression job, or changing compression parameters.