Struct brotli::enc::backward_references::BrotliEncoderParams

source ·
pub struct BrotliEncoderParams {
Show 22 fields pub dist: BrotliDistanceParams, pub mode: BrotliEncoderMode, pub quality: i32, pub q9_5: bool, pub lgwin: i32, pub lgblock: i32, pub size_hint: usize, pub disable_literal_context_modeling: i32, pub hasher: BrotliHasherParams, pub log_meta_block: bool, pub stride_detection_quality: u8, pub high_entropy_detection_quality: u8, pub cdf_adaptation_detection: u8, pub prior_bitmask_detection: u8, pub literal_adaptation: [(u16, u16); 4], pub large_window: bool, pub avoid_distance_prefix_search: bool, pub catable: bool, pub use_dictionary: bool, pub appendable: bool, pub magic_number: bool, pub favor_cpu_efficiency: bool,
}

Fields§

§dist: BrotliDistanceParams§mode: BrotliEncoderMode

if this brotli file is generic, font or specifically text

§quality: i32

quality param between 0 and 11 (11 is smallest but takes longest to encode)

§q9_5: bool§lgwin: i32

log of how big the ring buffer should be for copying prior data

§lgblock: i32

log of how often metablocks should be serialized

§size_hint: usize

how big the source file is (or 0 if no hint is provided)

§disable_literal_context_modeling: i32

avoid serializing out priors for literal sections in the favor of decode speed

§hasher: BrotliHasherParams§log_meta_block: bool

produce an IR of the compression file

§stride_detection_quality: u8

attempt to detect how many bytes before the current byte generates the best prediction of it

  • 0 = off (stride 1 always)
  • 1 = on per 16th of a file
  • 2 = on per block type switch
§high_entropy_detection_quality: u8

if nonzero, will search for high entropy strings and log them differently to the IR

§cdf_adaptation_detection: u8

if nonzero it will search for the temporal locality and effectiveness of the priors for literals. The best adaptation and forgetfulness will be logged per metablock to the IR

§prior_bitmask_detection: u8

whether to search for whether the previous byte or the context_map are better predictors on a per-context-map basis

§literal_adaptation: [(u16, u16); 4]

for prior bitmask detection: stride_low, stride_speed, cm_low, cm_speed

§large_window: bool§avoid_distance_prefix_search: bool

avoid search for the best ndirect vs npostfix parameters for distance

§catable: bool

construct brotli in such a way that it may be concatenated with another brotli file using appropriate bit ops

§use_dictionary: bool

can use the dictionary (default yes unless catable is set)

§appendable: bool

construct brotli in such a way that another concatable brotli file may be appended

§magic_number: bool

include a magic number and version number and size_hint at the beginning

§favor_cpu_efficiency: bool

prefer to compute the map of previously seen strings just once for all the threads at the beginning, since they overlap significantly

Trait Implementations§

source§

impl Clone for BrotliEncoderParams

source§

fn clone(&self) -> BrotliEncoderParams

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 BrotliEncoderParams

source§

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

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

impl Default for BrotliEncoderParams

source§

fn default() -> BrotliEncoderParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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 T
where 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 T
where 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 T
where 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 T
where 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.