Skip to main content

decode

Function decode 

Source
pub fn decode(text: &str, max_bytes: usize) -> Result<Vec<u8>, Error>
Expand description

Decode a machine value with a required maximum byte length.

Checks encoded length before conversion, bounds allocation by the input and decoded limit, and rejects excess decoded bytes. Whitespace is not trimmed. The caller must select a field-appropriate limit; this is not a CPU time limit.