Skip to main content

decode_writer

Function decode_writer 

Source
pub const fn decode_writer<W: Write>(inner: W) -> DecodeWriter<W, 32> 
Expand description

Creates a decoding writer that wraps an io::Write.\n\nThe writer buffers base32_hex encoded bytes with padding, decodes them, and writes the raw output to the inner writer.\n\n# Examples\n\n\nuse omp_core::base32_hex;\nuse std::io::Write;\n\nlet mut output = Vec::new();\nlet encoded = base32_hex::encode(b\"Hello\").into_vec();\nlet mut writer = base32_hex::decode_writer(&mut output);\nwriter.write_all(&encoded).unwrap();\nwriter.flush().unwrap();\nassert_eq!(output, b\"Hello\");\n\n