pub fn block<R, W, C, E>(
r: R,
w: &mut W,
c: C,
err: &mut Option<E>,
block_size: usize
) -> Result<Success>where
R: BufRead,
W: Write,
C: ConvertSlice<u8>,
E: Write,
Expand description
Treats the input as a sequence of newline or end-of-file terminated variable length records independent of input and output block boundaries. Any trailing newline char- acter is discarded. Each input record is converted to a fixed length output record where the length is specified by the cbs operand. Input records shorter than the conversion record size are padded with spaces. Input records longer than the conver- sion 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.