pub fn write_bytes(w: &mut impl Write, data: &[u8]) -> Result<()>
Write a length-prefixed, 8-byte-aligned byte buffer.