pub struct Gzip {}Expand description
Gzip deflate stream with gzip header and footer.
Trait Implementations§
Source§impl FormatSpec for Gzip
impl FormatSpec for Gzip
type Compressor = Compress
Source§fn create_compressor(
&self,
compression_level: Compression,
) -> Result<Self::Compressor, GzpError>
fn create_compressor( &self, compression_level: Compression, ) -> Result<Self::Compressor, GzpError>
Create a thread local compressor
Source§fn needs_dict(&self) -> bool
fn needs_dict(&self) -> bool
Whether or not this format should try to use a dictionary.
Source§fn encode(
&self,
input: &[u8],
encoder: &mut Self::Compressor,
compression_level: Compression,
dict: Option<&Bytes>,
is_last: bool,
) -> Result<Vec<u8>, GzpError>
fn encode( &self, input: &[u8], encoder: &mut Self::Compressor, compression_level: Compression, dict: Option<&Bytes>, is_last: bool, ) -> Result<Vec<u8>, GzpError>
How to deflate bytes for this format. Returns deflated bytes.
Source§fn header(&self, compression_level: Compression) -> Vec<u8> ⓘ
fn header(&self, compression_level: Compression) -> Vec<u8> ⓘ
Generate a generic header for the given format.
Generate a genric footer for the format.
Source§const DEFAULT_BUFSIZE: usize = 131_072usize
const DEFAULT_BUFSIZE: usize = 131_072usize
The default buffersize to use for this format
Source§fn create_check() -> Self::C
fn create_check() -> Self::C
Create a check value for this format that implements
CheckSource§impl<W> SyncWriter<W> for Gzipwhere
W: Write,
impl<W> SyncWriter<W> for Gzipwhere
W: Write,
type OutputWriter = GzEncoder<W>
fn sync_writer(writer: W, compression_level: Compression) -> GzEncoder<W>
impl Copy for Gzip
Auto Trait Implementations§
impl Freeze for Gzip
impl RefUnwindSafe for Gzip
impl Send for Gzip
impl Sync for Gzip
impl Unpin for Gzip
impl UnwindSafe for Gzip
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