Function zbase32::decode_full_bytes
[−]
[src]
pub fn decode_full_bytes(zbase: &[u8]) -> Result<Vec<u8>, &'static str>
Decode given zbase32 encoded string
Just like decode but doesn't allow decoding with bit precision.
This decodes full bytes. For instance, if you have b"yy", you'll get one
byte back. b"yy" can enode 10 bits (2 * 5) which is truncated at the next
lower byte boundary.
Examples
use zbase32; assert_eq!(zbase32::decode_full_bytes(b"qb1ze3m1").unwrap(), b"peter");