fn spaces(wr: &mut dyn Write, n: usize) -> EncodeResult