Function zstd_safe::get_frame_content_size [] [src]

pub fn get_frame_content_size(src: &[u8]) -> u64

ZSTD_getFrameContentSize()

src should point to the start of a ZSTD encoded frame

srcSize must be at least as large as the frame header. A value greater than or equal to ZSTD_frameHeaderSize_max is guaranteed to be large enough in all cases.

Returns the decompressed size of the frame pointed to be src if known, otherwise:

  • ZSTD_CONTENTSIZE_UNKNOWN if the size cannot be determined
  • ZSTD_CONTENTSIZE_ERROR if an error occurred (e.g. invalid magic number, srcSize too small)