Skip to main content

Module paste

Module paste 

Source

Structs§

PasteConfig
Configuration for the paste command.

Functions§

parse_delimiters
Parse delimiter string with escape sequences. Supports: \n (newline), \t (tab), \ (backslash), \0 (NUL), empty string (no delimiter).
paste
Main paste entry point. Writes directly to the provided writer.
paste_parallel_stream
Streaming paste for the parallel (normal) mode. Uses memchr per-line scanning and a 1MB output buffer with raw fd writes. For the common 2-file case, dispatches to an optimized fast path.
paste_parallel_to_vec
Paste files in normal (parallel) mode and return the output buffer. Pre-splits files into line offsets (one SIMD pass each), then the main loop uses O(1) array indexing instead of per-line memchr calls. Uses unsafe raw pointer writes to eliminate bounds-check overhead.
paste_serial_stream
Streaming paste for serial mode.
paste_serial_to_vec
Paste files in serial mode and return the output buffer. For each file, join all lines with the delimiter list (cycling). Pre-splits lines using SIMD memchr, then iterates offset pairs.
paste_stream
Streaming paste entry point. Writes directly to stdout using raw fd writes.
paste_to_vec
Build the paste output as a Vec, then return it for the caller to write. This allows the binary to use raw write() for maximum throughput.