Function zstd_sys::ZSTD_decompressionMargin

source ·
pub unsafe extern "C" fn ZSTD_decompressionMargin(
    src: *const c_void,
    srcSize: usize,
) -> usize
Expand description

ZSTD_decompressionMargin() : Zstd supports in-place decompression, where the input and output buffers overlap. In this case, the output buffer must be at least (Margin + Output_Size) bytes large, and the input buffer must be at the end of the output buffer.

_______________________ Output Buffer ________________________ | | | ____ Input Buffer | | | | v v v |—————————————|———–|–––––| ^ ^ ^ |_______________ Output_Size __________________| Margin _|

NOTE: See also ZSTD_DECOMPRESSION_MARGIN(). NOTE: This applies only to single-pass decompression through ZSTD_decompress() or ZSTD_decompressDCtx(). NOTE: This function supports multi-frame input.

@param src The compressed frame(s) @param srcSize The size of the compressed frame(s) @returns The decompression margin or an error that can be checked with ZSTD_isError().