pub struct Inflate(/* private fields */);Expand description
The state that is used to decompress an input.
Implementations§
Source§impl Inflate
impl Inflate
Sourcepub fn total_out(&self) -> u64
pub fn total_out(&self) -> u64
The amount of decompressed bytes that have been written to the output thus far.
Sourcepub fn error_message(&self) -> Option<&'static str>
pub fn error_message(&self) -> Option<&'static str>
The error message if the previous operation failed.
Sourcepub fn new(zlib_header: bool, window_bits: u8) -> Self
pub fn new(zlib_header: bool, window_bits: u8) -> Self
Create a new instance. Note that it allocates in various ways and thus should be re-used.
The window_bits must be in the range 8..=15, with 15 being most common.
Sourcepub fn decompress(
&mut self,
input: &[u8],
output: &mut [u8],
flush: InflateFlush,
) -> Result<Status, InflateError>
pub fn decompress( &mut self, input: &[u8], output: &mut [u8], flush: InflateFlush, ) -> Result<Status, InflateError>
Decompress input and write all decompressed bytes into output, with flush defining some details about this.
pub fn set_dictionary(&mut self, dictionary: &[u8]) -> Result<u32, InflateError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inflate
impl RefUnwindSafe for Inflate
impl Send for Inflate
impl Sync for Inflate
impl Unpin for Inflate
impl !UnwindSafe for Inflate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more