Struct brotli::enc::prior_eval::PriorEval

source ·
pub struct PriorEval<'a, Alloc: Allocator<s16> + Allocator<u32> + Allocator<v8>> {
Show 15 fields input: InputPair<'a>, context_map: PredictionModeContextMap<InputReferenceMut<'a>>, block_type: u8, local_byte_offset: usize, _nop: <Alloc as Allocator<u32>>::AllocatedMemory, cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory, slow_cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory, fast_cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory, stride_priors: [<Alloc as Allocator<s16>>::AllocatedMemory; 4], adv_priors: <Alloc as Allocator<s16>>::AllocatedMemory, _stride_pyramid_leaves: [u8; 8], score: <Alloc as Allocator<v8>>::AllocatedMemory, cm_speed: [(u16, u16); 2], stride_speed: [(u16, u16); 2], cur_stride: u8,
}

Fields§

§input: InputPair<'a>§context_map: PredictionModeContextMap<InputReferenceMut<'a>>§block_type: u8§local_byte_offset: usize§_nop: <Alloc as Allocator<u32>>::AllocatedMemory§cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory§slow_cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory§fast_cm_priors: <Alloc as Allocator<s16>>::AllocatedMemory§stride_priors: [<Alloc as Allocator<s16>>::AllocatedMemory; 4]§adv_priors: <Alloc as Allocator<s16>>::AllocatedMemory§_stride_pyramid_leaves: [u8; 8]§score: <Alloc as Allocator<v8>>::AllocatedMemory§cm_speed: [(u16, u16); 2]§stride_speed: [(u16, u16); 2]§cur_stride: u8

Implementations§

source§

impl<'a, Alloc: Allocator<s16> + Allocator<u32> + Allocator<v8>> PriorEval<'a, Alloc>

source

pub fn new( alloc: &mut Alloc, input: InputPair<'a>, stride: [u8; 8], prediction_mode: PredictionModeContextMap<InputReferenceMut<'a>>, params: &BrotliEncoderParams, ) -> Self

source

pub fn choose_bitmask(&mut self)

source

pub fn free(&mut self, alloc: &mut Alloc)

source

pub fn take_prediction_mode( &mut self, ) -> PredictionModeContextMap<InputReferenceMut<'a>>

source

fn update_cost_base( &mut self, stride_prior: [u8; 8], stride_prior_offset: usize, selected_bits: u8, cm_prior: usize, literal: u8, )

Trait Implementations§

source§

impl<'a, 'b, Alloc: Allocator<s16> + Allocator<u32> + Allocator<v8>> CommandProcessor<'b> for PriorEval<'a, Alloc>

source§

fn push(&mut self, val: Command<InputReference<'b>>)

source§

fn push_literals(&mut self, data: &InputPair<'a>)

source§

fn push_rand_literals(&mut self, data: &InputPair<'a>)

source§

fn push_block_switch_literal(&mut self, block_type: u8)

source§

impl<'a, Alloc: Allocator<s16> + Allocator<u32> + Allocator<v8>> IRInterpreter for PriorEval<'a, Alloc>

source§

fn inc_local_byte_offset(&mut self, inc: usize)

source§

fn local_byte_offset(&self) -> usize

source§

fn update_block_type(&mut self, new_type: u8, stride: u8)

source§

fn block_type(&self) -> u8

source§

fn literal_data_at_offset(&self, index: usize) -> u8

source§

fn literal_context_map(&self) -> &[u8]

source§

fn prediction_mode(&self) -> LiteralPredictionModeNibble

source§

fn update_cost( &mut self, stride_prior: [u8; 8], stride_prior_offset: usize, selected_bits: u8, cm_prior: usize, literal: u8, )

Auto Trait Implementations§

§

impl<'a, Alloc> Freeze for PriorEval<'a, Alloc>

§

impl<'a, Alloc> RefUnwindSafe for PriorEval<'a, Alloc>

§

impl<'a, Alloc> Send for PriorEval<'a, Alloc>

§

impl<'a, Alloc> Sync for PriorEval<'a, Alloc>

§

impl<'a, Alloc> Unpin for PriorEval<'a, Alloc>

§

impl<'a, Alloc> !UnwindSafe for PriorEval<'a, Alloc>

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, 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.