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. Scans each file line-by-line with memchr on-the-fly — no pre-split offset arrays. Uses a single 2MB output buffer with raw fd writes.
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. For each file, join all lines with the delimiter list (cycling).
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).
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.
raw_write_all
Raw write to stdout fd 1. Returns any error encountered.