Skip to main content

write_skippable_frame

Function write_skippable_frame 

Source
pub fn write_skippable_frame<W: Write>(
    magic_variant: u8,
    payload: &[u8],
    writer: &mut W,
) -> Result<usize, SkippableFrameError>
Available on crate feature lsm only.
Expand description

Free function for callers that want to write a skippable frame directly into a sink without constructing a temporary SkippableFrame. Shape mirrors donor ZSTD_writeSkippableFrame(dst, dstCapacity, src, srcSize, magicVariant) — same validation, same byte-level output.

On success returns the number of bytes written (payload.len() + 8).