Function encoded_size

Source
pub fn encoded_size(value: impl ToU64) -> usize
Expand description

Returns the number of bytes used to encode this CompactSize value.

ยงReturns

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