[][src]Struct async_compression::brotli2::CompressParams

pub struct CompressParams { /* fields omitted */ }
This is supported on feature="brotli" only.

Parameters passed to various compression routines.

Methods

impl CompressParams[src]

pub fn new() -> CompressParams[src]

This is supported on feature="brotli" only.

Creates a new default set of compression parameters.

pub fn mode(&mut self, mode: CompressMode) -> &mut CompressParams[src]

This is supported on feature="brotli" only.

Set the mode of this compression.

pub fn quality(&mut self, quality: u32) -> &mut CompressParams[src]

This is supported on feature="brotli" only.

Controls the compression-speed vs compression-density tradeoffs.

The higher the quality, the slower the compression. Currently the range for the quality is 0 to 11.

pub fn lgwin(&mut self, lgwin: u32) -> &mut CompressParams[src]

This is supported on feature="brotli" only.

Sets the base 2 logarithm of the sliding window size.

Currently the range is 10 to 24.

pub fn lgblock(&mut self, lgblock: u32) -> &mut CompressParams[src]

This is supported on feature="brotli" only.

Sets the base 2 logarithm of the maximum input block size.

Currently the range is 16 to 24, and if set to 0 the value will be set based on the quality.

pub fn get_lgblock_readable(&self) -> usize[src]

This is supported on feature="brotli" only.

Get the current block size

pub fn get_lgblock(&self) -> u32[src]

This is supported on feature="brotli" only.

Get the native lgblock size

pub fn get_lgwin_readable(&self) -> usize[src]

This is supported on feature="brotli" only.

Get the current window size

pub fn get_lgwin(&self) -> u32[src]

This is supported on feature="brotli" only.

Get the native lgwin value

Trait Implementations

impl Debug for CompressParams[src]

impl Clone for CompressParams[src]

Auto Trait Implementations

Blanket Implementations

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 = !

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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