pub fn write_frame( writer: &mut impl Write, payload: &[u8], next_offset: &mut u64, description: &str, ) -> Result<u64, String>