Module decode

Module decode 

Source
Expand description

CBOR decoder

Functions§

read_bytes
Reads len number of bytes from a byte stream.
read_f32
Reads a f32 from a byte stream.
read_f64
Reads a f64 from a byte stream.
read_link
Reads a cid from a stream of cbor encoded bytes.
read_list
Reads a list of any type that implements TryReadCbor from a stream of cbor encoded bytes.
read_major
Read a and validate major “byte”. This includes both the major type and the additional info.
read_map
Reads a map of any type that implements TryReadCbor from a stream of cbor encoded bytes.
read_str
Reads len number of bytes from a byte stream and converts them to a string.
read_u8
Reads a u8 from a byte stream.
read_u16
Reads a u16 from a byte stream.
read_u32
Reads a u32 from a byte stream.
read_u64
Reads a u64 from a byte stream.
read_uint
Read the uint argument to the given major type. This function errors if: