-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move deflate_dec to its own module, too
- Loading branch information
1 parent
7038eb1
commit ebe7b47
Showing
5 changed files
with
53 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use std::io::Read; | ||
|
||
use flate2::read::DeflateDecoder; | ||
|
||
use crate::reader::sync::{Decoder, LimitedReader}; | ||
|
||
impl<R> Decoder<R> for DeflateDecoder<R> | ||
where | ||
R: Read, | ||
{ | ||
fn into_inner(self: Box<Self>) -> R { | ||
Self::into_inner(*self) | ||
} | ||
|
||
fn get_mut(&mut self) -> &mut R { | ||
Self::get_mut(self) | ||
} | ||
} | ||
|
||
pub(crate) fn mk_decoder(r: LimitedReader) -> impl Decoder<LimitedReader> { | ||
DeflateDecoder::new(r) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters