Function ZSTD_findFrameCompressedSize

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

ZSTD_findFrameCompressedSize() : Requires v1.4.0+ src should point to the start of a ZSTD frame or skippable frame. srcSize must be >= first frame size @return : the compressed size of the first frame starting at src, suitable to pass as srcSize to ZSTD_decompress or similar, or an error code if input is invalid Note 1: this method is called _find*() because it’s not enough to read the header, it may have to scan through the frame’s content, to reach its end. Note 2: this method also works with Skippable Frames. In which case, it returns the size of the complete skippable frame, which is always equal to its content size + 8 bytes for headers.