Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn create_deserializer<R: Read>(input: R) -> Result<Deserializer> {
- // read header data
- let input = if is_compressed {
- let mut compressed_data = vec![];
- input.read_to_end(&mut compressed_data)?;
- decompress(&compressed_data[..])
- } else {
- input
- };
- Ok(Deserializer {
- input,
- })
- }
Add Comment
Please, Sign In to add comment