Skip to main content

write_frame

Function write_frame 

Source
pub fn write_frame(writer: &mut impl Write, payload: &[u8]) -> ZamResult<usize>
Expand description

Wire format: [4 bytes] uint32 big-endian – total byte count that follows (flag + body) [1 byte] compression flag – 0x00 raw, 0x01 zstd [N bytes] body – raw payload or zstd-compressed payload

Returns the number of bytes written to writer (length prefix + flag + body).