Function dharitri_codec::using_encoded_number
source · pub fn using_encoded_number<F: FnOnce(&[u8])>(
x: u64,
size_in_bits: usize,
signed: bool,
compact: bool,
f: F
)Expand description
Adds number to output buffer. No argument generics here, because we want the executable binary as small as possible. Smaller types need to be converted to u64 before using this function. TODO: there might be a quicker version of this using transmute + reverse bytes.