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 8MB read buffer for maximum pipe throughput — read_full retries to fill the entire buffer from the pipe, saturating the 4MB pipe buffer and reducing syscall count. 8MB means ~2 read+decode+write cycles for 10MB. memchr2-based SIMD whitespace stripping handles the common case efficiently.