pub fn decode_unchecked(slice: &mut &[u8]) -> u64Expand description
Gets the compact size encoded value from slice and moves slice past the encoding.
Caller to guarantee that the encoding is well formed. Well formed is defined as:
- Being at least long enough.
- Containing a minimal encoding.
§Panics
- Panics in release mode if the
slicedoes not contain a valid minimal compact size encoding. - Panics in debug mode if the encoding is not minimal (referred to as “non-canonical” in Core).