pub fn block<R, W, C, E>(
r: R,
w: &mut W,
c: C,
e: ErrHandler<E>,
block_size: usize,
) -> Result<Success>
Expand description
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.