Skip to main content

header

Function header 

Source
fn header(major: u8, argument: u64, out: &mut Vec<u8>)
Expand description

Writes a major type and its argument in the shortest form that holds it.

The five widths are the whole of CBOR’s ambiguity about numbers: 23 can be written inline, or in one, two, four or eight following bytes, and all five decode to 23. Only the first is DAG-CBOR.