Skip to main content

max_encoded_len

Function max_encoded_len 

Source
pub const fn max_encoded_len(max_bytes: usize) -> usize
Expand description

Conservative text bound for a decoded byte limit; saturates on overflow.

A value within this bound can still exceed the decoded limit. Empty bytes encode as empty text. The ratio 1.38 exceeds log(256) / log(58).