Function zstd_safe::get_frame_content_size
source ยท pub fn get_frame_content_size(
src: &[u8],
) -> Result<Option<u64>, ContentSizeError>
Expand description
Wraps the ZSTD_getFrameContentSize()
function.
Args:
src
: A prefix of the compressed frame. It should at least include the frame header.
Returns:
Err(ContentSizeError)
ifsrc
is too small of a prefix, or if it appears corrupted.Ok(None)
if the frame does not include a content size.Ok(Some(content_size_in_bytes))
otherwise.