[][src]Enum binjs::io::bytes::compress::Compression

pub enum Compression {
    Identity,
    Gzip,
    Deflate,
    Brotli,
    Lzw,
}

The compression mechanisms supported by this encoder. They are designed to match HTTP's Accept-Encoding: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding

Variants

Identity

no compression (identity;)

Gzip

gzip compression (gzip;)

Deflate

zlib compression (deflate;)

Brotli

brotly compression (br;)

Lzw

Lwz compression (compress;)

Methods

impl Compression[src]

pub fn name(&self) -> &str[src]

pub fn code(&self) -> &str[src]

pub fn parse(name: Option<&str>) -> Option<Compression>[src]

pub fn values() -> Box<[Compression]>[src]

pub fn is_compressed(&self) -> bool[src]

pub fn compress<W>(
    &self,
    data: &[u8],
    out: &mut W
) -> Result<CompressionResult, Error> where
    W: Write
[src]

pub fn decompress<R, T>(
    inp: &mut R,
    deserializer: &T
) -> Result<<T as Deserializer>::Target, Error> where
    R: Read,
    T: Deserializer
[src]

Trait Implementations

impl Clone for Compression[src]

impl Debug for Compression[src]

impl Eq for Compression[src]

impl Hash for Compression[src]

impl PartialEq<Compression> for Compression[src]

impl StructuralEq for Compression[src]

impl StructuralPartialEq for Compression[src]

Auto Trait Implementations

impl RefUnwindSafe for Compression

impl Send for Compression

impl Sync for Compression

impl Unpin for Compression

impl UnwindSafe for Compression

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Send + Sync + Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]