Skip to main content

decode_raw

Function decode_raw 

Source
pub fn decode_raw<S: AsRef<[u8]> + ?Sized>(src: &S) -> Decoder<'_>
Expand description

Decodes base32 encoded bytes without padding.

§Arguments

  • src - The encoded byte slice to decode

§Returns

An iterator that yields decoded bytes.

§Example

use omp_core::base32;
let encoded = base32::encode_raw(b"hello").into_string();
let decoded = base32::decode_raw(&encoded).into_vec().unwrap();
assert_eq!(decoded, b"hello");