pub fn bytestring_to_writer<W: Write>(w: &mut W, data: &[u8]) -> Result<()>
Writes a length-prefixed byte string to a writer.