Skip to main content

Module core

Module core 

Source

Functionsยง

decode_owned
Decode base64 from an owned Vec (in-place whitespace strip + decode).
decode_stream
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.
decode_to_writer
Decode base64 data and write to output (borrows data, allocates clean buffer). When ignore_garbage is true, strip all non-base64 characters. When false, only strip whitespace (standard behavior).
encode_stream
Stream-encode from a reader to a writer. Used for stdin processing. Dispatches to specialized paths for wrap_col=0 (no wrap) and wrap_col>0 (wrapping).
encode_to_writer
Encode data and write to output with line wrapping. Uses SIMD encoding with fused encode+wrap for maximum throughput.