[−][src]Struct bzip2::Decompress
Representation of an in-memory decompression stream.
An instance of Decompress
can be used to inflate a stream of bz2-encoded
data.
Methods
impl Decompress
[src][−]
pub fn new(small: bool) -> Decompress
[src][−]
Creates a new stream prepared for decompression.
If small
is true, then the library will use an alternative
decompression algorithm which uses less memory but at the cost of
decompressing more slowly (roughly speaking, half the speed, but the
maximum memory requirement drops to around 2300k). See
pub fn decompress(
&mut self,
input: &[u8],
output: &mut [u8]
) -> Result<Status, Error>
[src][−]
&mut self,
input: &[u8],
output: &mut [u8]
) -> Result<Status, Error>
Decompress a block of input into a block of output.
pub fn decompress_vec(
&mut self,
input: &[u8],
output: &mut Vec<u8>
) -> Result<Status, Error>
[src][−]
&mut self,
input: &[u8],
output: &mut Vec<u8>
) -> Result<Status, Error>
Decompress a block of input into an output vector.
This function will not grow output
, but it will fill the space after
its current length up to its capacity. The length of the vector will be
adjusted appropriately.
pub fn total_in(&self) -> u64
[src][−]
Total number of bytes processed as input
pub fn total_out(&self) -> u64
[src][−]
Total number of bytes processed as output
Auto Trait Implementations
impl Send for Decompress
impl Sync for Decompress
Blanket Implementations
impl<T> From for T
[src][−]
impl<T, U> Into for T where
U: From<T>,
[src][−]
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src][−]
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src][−]
impl<T> Borrow for T where
T: ?Sized,
[src][−]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src][−]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src][−]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src][−]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src][−]
impl<T> Any for T where
T: 'static + ?Sized,
[src][−]
T: 'static + ?Sized,