use byteorder::{ReadBytesExt, WriteBytesExt}; use std::io::{Read, Seek, Write}; use crate::common::CzError; pub fn decode(input: &mut T) -> Result, CzError> { // Get the rest of the file, which is the bitmap let mut bitmap = vec![]; input.read_to_end(&mut bitmap)?; Ok(bitmap) } pub fn encode(output: &mut T, bitmap: &[u8]) -> Result<(), CzError> { output.write_all(bitmap)?; Ok(()) }