pub enum CompressionType {
    None,
    Zstd,
    Snappy,
    Gzip,
    Zlib,
    Deflate,
    Bzip2,
    LZ4,
    XZ,
}
Expand description

final_compression consolidates almost all popular compression algorithms together and provide a unified Read/Write interface to support compression and decompression of stream data.

You can use this library to operate on the following Stream Compression types:

  • Zstd
  • Snappy
  • Gzip
  • Zlib
  • Deflate
  • Bzip2
  • LZ4
  • XZ Represent the intended compression type

Variants§

§

None

No compression - pass through

§

Zstd

zstd compression type. Supported parameter: level=u32 (1~22. 1-fastest, 22-highest, Default 3) Example of parameter: “level=3”

§

Snappy

snappy compression type. Supported parameter: None Example of parameter: “”. All parameters are ignored

§

Gzip

gzip compression type. Supported parameter: level=u32 (1~9 1-fastest, 9-highest, default 3) Example of parameter: “level=3”

§

Zlib

zlib compression type. Supported parameter: level=u32 (0~9 0-fastest, 9-highest, default 3) Example of parameter: “level=3”

§

Deflate

deflate compression type. Supported parameter: level=u32 (0~9 0-fastest, 9-highest, default 3) Example of parameter: “level=3”

§

Bzip2

bz2 compression type. Supported parameter: level=u32 (1~9 1-fastest, 9-highest, default 3) Example of parameter: “level=3”

§

LZ4

lz4 compression type. Supported parameter: level=u32 (0~16 1-fastest, 16-highest, default 1) block_mode=linked (linked|independent, default linked) Example of parameter: “level=1;block_mode=linked”

§

XZ

xz compression type. Supported parameter: level=u32 (0~9 0-fastest, 9-highest, default 6) Example of parameter: “level=3”

Trait Implementations§

source§

impl Clone for CompressionType

source§

fn clone(&self) -> CompressionType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CompressionType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for CompressionType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.