pub unsafe fn flush<W: Write + IoWrite>(writer: &mut W)