Module copy

Source
Expand description

copy bytes from a Reader to a Writer converting them according to a Converter

Functions§

block
Copy a series of newline or EOF-terminated blocks from R to W, converting according to C. opts::Mode::Unblock treats the input as a sequence of ‘\n’ or EOF-terminated variable length records independent of input and output block boundaries. Any trailing ‘\n’ is discarded. Each input record is converted to a fixed length output record where the length is specified by the conversion_block_size operand. Input records shorter than the conversion record size are padded with spaces. Input records longer than the conversion record size are truncated. The number of truncated input records, if any, are reported to the standard error output at the completion of the copy.
bytes
fill_buf_to
fill the buffer with unwrapped elements from it until it has len cap
fill_buf_until_match
fill the buffer from it until and including the first item that matches want
standard
Copy bytes from R to W, converting according to C. See opts::Mode::Standard
unblock
Copy a series of fixed-length records from R to W, converting according to C. opts::Mode::Unblock treats the input as a sequence of fixed length records independent of input and output block boundaries. The length of the input records is specified by the conversion_block_size option option. Any trailing space characters are discarded and a newline character is appended.