Struct dbcomprs::DefaultCompressor
source · pub struct DefaultCompressor;
Expand description
Default compressor
Trait Implementations§
source§impl Clone for DefaultCompressor
impl Clone for DefaultCompressor
source§fn clone(&self) -> DefaultCompressor
fn clone(&self) -> DefaultCompressor
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Compressor for DefaultCompressor
impl Compressor for DefaultCompressor
source§fn compress_to(
src: &[u8],
dst: &mut [u8],
cmp: Compression
) -> Result<usize, Self::Error>
fn compress_to( src: &[u8], dst: &mut [u8], cmp: Compression ) -> Result<usize, Self::Error>
Compresses the given data into the given output buffer, returning the number of bytes written.
source§fn compress_into_vec(
src: &[u8],
cmp: Compression
) -> Result<Vec<u8>, Self::Error>
fn compress_into_vec( src: &[u8], cmp: Compression ) -> Result<Vec<u8>, Self::Error>
Compresses the given data into a new vector.
source§fn decompress_to(
src: &[u8],
dst: &mut [u8],
cmp: Compression
) -> Result<usize, Self::Error>
fn decompress_to( src: &[u8], dst: &mut [u8], cmp: Compression ) -> Result<usize, Self::Error>
Decompresses the given data into the given output buffer, returning the number of bytes written.
source§fn decompress_into_vec(
src: &[u8],
cmp: Compression
) -> Result<Vec<u8>, Self::Error>
fn decompress_into_vec( src: &[u8], cmp: Compression ) -> Result<Vec<u8>, Self::Error>
Decompresses the given data into a new vector.
source§fn max_compressed_size(src: &[u8], cmp: Compression) -> usize
fn max_compressed_size(src: &[u8], cmp: Compression) -> usize
Returns the maximum size of the compressed data according to the compression algorithm and src size.
source§fn compress_into_bytes(
src: &[u8],
cmp: Compression
) -> Result<Bytes, Self::Error>
fn compress_into_bytes( src: &[u8], cmp: Compression ) -> Result<Bytes, Self::Error>
Compresses the given data into a new
bytes::Bytes
.source§fn decompress_into_bytes(
src: &[u8],
cmp: Compression
) -> Result<Bytes, Self::Error>
fn decompress_into_bytes( src: &[u8], cmp: Compression ) -> Result<Bytes, Self::Error>
Decompresses the given data into a new
bytes::Bytes
.source§impl Debug for DefaultCompressor
impl Debug for DefaultCompressor
source§impl Default for DefaultCompressor
impl Default for DefaultCompressor
source§fn default() -> DefaultCompressor
fn default() -> DefaultCompressor
Returns the “default value” for a type. Read more
source§impl Hash for DefaultCompressor
impl Hash for DefaultCompressor
source§impl PartialEq<DefaultCompressor> for DefaultCompressor
impl PartialEq<DefaultCompressor> for DefaultCompressor
source§fn eq(&self, other: &DefaultCompressor) -> bool
fn eq(&self, other: &DefaultCompressor) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.