pub struct DeflateEncoder<'a> {
data: &'a [u8],
options: DeflateEncodingOptions,
output_position: usize,
input_position: usize,
output: Vec<u8>,
}
Expand description
A simple Deflate Encoder.
Not yet complete
Fields§
§data: &'a [u8]
§options: DeflateEncodingOptions
§output_position: usize
§input_position: usize
§output: Vec<u8>
Implementations§
source§impl<'a> DeflateEncoder<'a>
impl<'a> DeflateEncoder<'a>
sourcepub fn new(data: &'a [u8]) -> DeflateEncoder<'a>
pub fn new(data: &'a [u8]) -> DeflateEncoder<'a>
Create a new deflate encoder.
The
pub fn new_with_options( data: &'a [u8], options: DeflateEncodingOptions, ) -> DeflateEncoder<'a>
fn write_zlib_header(&mut self)
sourcefn encode_no_compression(&mut self, bytes: usize)
fn encode_no_compression(&mut self, bytes: usize)
Encode a deflate data block with no compression
§Argument
bytes
: number of bytes to compress from input as non-compressed bytes
sourcepub fn encode_deflate(&mut self)
pub fn encode_deflate(&mut self)
Encode a deflate stream
pub fn encode_zlib(&mut self) -> Vec<u8>
Auto Trait Implementations§
impl<'a> Freeze for DeflateEncoder<'a>
impl<'a> RefUnwindSafe for DeflateEncoder<'a>
impl<'a> Send for DeflateEncoder<'a>
impl<'a> Sync for DeflateEncoder<'a>
impl<'a> Unpin for DeflateEncoder<'a>
impl<'a> UnwindSafe for DeflateEncoder<'a>
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