Skip to main content

decode_writer_raw

Function decode_writer_raw 

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

Creates a decoding writer for unpadded base64.\n\nThe writer buffers base64 encoded bytes without padding, decodes them, and writes the raw output to the inner writer.\n\n# Examples\n\n\nuse omp_core::base64;\nuse std::io::Write;\n\nlet mut output = Vec::new();\nlet encoded = base64::encode_raw(b\"Hello\").into_vec();\nlet mut writer = base64::decode_writer_raw(&mut output);\nwriter.write_all(&encoded).unwrap();\nwriter.flush().unwrap();\nassert_eq!(output, b\"Hello\");\n\n