Skip to main content

decode_stream

Function decode_stream 

Source
pub fn decode_stream(
    reader: &mut impl Read,
    ignore_garbage: bool,
    writer: &mut impl Write,
) -> Result<()>
Expand description

Stream-decode from a reader to a writer. Used for stdin processing. Fused single-pass: read chunk -> strip whitespace -> decode immediately. Uses 4MB read buffer to match the enlarged pipe buffer size (set by fbase64.rs). Larger buffers (16MB) waste memory since pipes deliver at most 4MB per read. memchr2-based SIMD whitespace stripping handles the common case efficiently.