Skip to main content

FORMAT_PLAIN

Constant FORMAT_PLAIN 

Source
pub const FORMAT_PLAIN: u8 = 0;
Expand description

A plaintext frame is a format byte followed by the node bytes the decoder reads. The byte is a flag set with a single defined bit, FORMAT_COMPRESSED; FORMAT_PLAIN is the uncompressed form and the only one we emit.

Encoder writes this byte, unpack strips it, and the decoder never sees it. That is the whole reason a decoded buffer is one byte shorter than the marshal output it came from: pack is the conversion back.