encoded_size_const

Function encoded_size_const 

Source
pub const fn encoded_size_const(value: u64) -> usize
Expand description

Returns the number of bytes used to encode this CompactSize value (in const context).

ยงReturns

  • 1 for 0..=0xFC
  • 3 for 0xFD..=(2^16-1)
  • 5 for 0x10000..=(2^32-1)
  • 9 otherwise.