Skip to main content

encoded_len

Function encoded_len 

Source
pub const fn encoded_len(input_len: usize) -> usize
Expand description

Predict how many bytes encode is going to write given a input_len input length.

§Panics

Panics if any of the internal calculations overflow.

§Examples

assert_eq!(encoded_len(0), 0);
assert_eq!(encoded_len(16), 24);
assert_eq!(encoded_len(300), 410);