Struct miniz_oxide::deflate::core::CompressorOxide [−][src]
Main compression struct.
Implementations
impl CompressorOxide
[src]
pub fn new(flags: u32) -> Self
[src]
Create a new CompressorOxide
with the given flags.
Notes
This function may be changed to take different parameters in the future.
pub fn adler32(&self) -> u32
[src]
Get the adler32 checksum of the currently encoded data.
pub fn prev_return_status(&self) -> TDEFLStatus
[src]
Get the return status of the previous compress
call with this compressor.
pub fn flags(&self) -> i32
[src]
Get the raw compressor flags.
Notes
This function may be deprecated or changed in the future to use more rust-style flags.
pub fn data_format(&self) -> DataFormat
[src]
Returns whether the compressor is wrapping the data in a zlib format or not.
pub fn reset(&mut self)
[src]
Reset the state of the compressor, keeping the same parameters.
This avoids re-allocating data.
pub fn set_compression_level(&mut self, level: CompressionLevel)
[src]
Set the compression level of the compressor.
Using this to change level after compresson has started is supported.
Notes
The compression strategy will be reset to the default one when this is called.
pub fn set_compression_level_raw(&mut self, level: u8)
[src]
Set the compression level of the compressor using an integer value.
Using this to change level after compresson has started is supported.
Notes
The compression strategy will be reset to the default one when this is called.
pub fn set_format_and_level(&mut self, data_format: DataFormat, level: u8)
[src]
Update the compression settings of the compressor.
Changing the DataFormat
after compression has started will result in
a corrupted stream.
Notes
This function mainly intented for setting the initial settings after e.g creating with
default
or after calling CompressorOxide::reset()
, and behaviour may be changed
to disallow calling it after starting compression in the future.
Trait Implementations
impl Default for CompressorOxide
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,