Function zstd_sys::ZSTD_writeSkippableFrame
source ยท pub unsafe extern "C" fn ZSTD_writeSkippableFrame(
dst: *mut c_void,
dstCapacity: usize,
src: *const c_void,
srcSize: usize,
magicVariant: c_uint,
) -> usize
Expand description
ZSTD_writeSkippableFrame() : Generates a zstd skippable frame containing data given by src, and writes it to dst buffer.
Skippable frames begin with a 4-byte magic number. There are 16 possible choices of magic number, ranging from ZSTD_MAGIC_SKIPPABLE_START to ZSTD_MAGIC_SKIPPABLE_START+15. As such, the parameter magicVariant controls the exact skippable frame magic number variant used, so the magic number used will be ZSTD_MAGIC_SKIPPABLE_START + magicVariant.
Returns an error if destination buffer is not large enough, if the source size is not representable with a 4-byte unsigned int, or if the parameter magicVariant is greater than 15 (and therefore invalid).
@return : number of bytes written or a ZSTD error.