Struct brotli::enc::encode::BrotliEncoderStateStruct

source ·
pub struct BrotliEncoderStateStruct<Alloc: BrotliAlloc> {
Show 40 fields pub params: BrotliEncoderParams, pub m8: Alloc, pub hasher_: UnionHasher<Alloc>, pub input_pos_: u64, pub ringbuffer_: RingBuffer<Alloc>, pub cmd_alloc_size_: usize, pub commands_: <Alloc as Allocator<Command>>::AllocatedMemory, pub num_commands_: usize, pub num_literals_: usize, pub last_insert_len_: usize, pub last_flush_pos_: u64, pub last_processed_pos_: u64, pub dist_cache_: [i32; 16], pub saved_dist_cache_: [i32; 4], pub last_bytes_: u16, pub last_bytes_bits_: u8, pub prev_byte_: u8, pub prev_byte2_: u8, pub storage_size_: usize, pub storage_: <Alloc as Allocator<u8>>::AllocatedMemory, pub small_table_: [i32; 1024], pub large_table_: <Alloc as Allocator<i32>>::AllocatedMemory, pub cmd_depths_: [u8; 128], pub cmd_bits_: [u16; 128], pub cmd_code_: [u8; 512], pub cmd_code_numbits_: usize, pub command_buf_: <Alloc as Allocator<u32>>::AllocatedMemory, pub literal_buf_: <Alloc as Allocator<u8>>::AllocatedMemory, pub available_out_: usize, pub total_out_: u64, pub tiny_buf_: [u8; 16], pub remaining_metadata_bytes_: u32, pub stream_state_: BrotliEncoderStreamState, pub is_last_block_emitted_: bool, pub is_initialized_: bool, pub is_first_mb: IsFirst, pub literal_scratch_space: <HistogramLiteral as CostAccessors>::i32vec, pub command_scratch_space: <HistogramCommand as CostAccessors>::i32vec, pub distance_scratch_space: <HistogramDistance as CostAccessors>::i32vec, pub recoder_state: RecoderState, /* private fields */
}

Fields§

§params: BrotliEncoderParams§m8: Alloc§hasher_: UnionHasher<Alloc>§input_pos_: u64§ringbuffer_: RingBuffer<Alloc>§cmd_alloc_size_: usize§commands_: <Alloc as Allocator<Command>>::AllocatedMemory§num_commands_: usize§num_literals_: usize§last_insert_len_: usize§last_flush_pos_: u64§last_processed_pos_: u64§dist_cache_: [i32; 16]§saved_dist_cache_: [i32; 4]§last_bytes_: u16§last_bytes_bits_: u8§prev_byte_: u8§prev_byte2_: u8§storage_size_: usize§storage_: <Alloc as Allocator<u8>>::AllocatedMemory§small_table_: [i32; 1024]§large_table_: <Alloc as Allocator<i32>>::AllocatedMemory§cmd_depths_: [u8; 128]§cmd_bits_: [u16; 128]§cmd_code_: [u8; 512]§cmd_code_numbits_: usize§command_buf_: <Alloc as Allocator<u32>>::AllocatedMemory§literal_buf_: <Alloc as Allocator<u8>>::AllocatedMemory§available_out_: usize§total_out_: u64§tiny_buf_: [u8; 16]§remaining_metadata_bytes_: u32§stream_state_: BrotliEncoderStreamState§is_last_block_emitted_: bool§is_initialized_: bool§is_first_mb: IsFirst§literal_scratch_space: <HistogramLiteral as CostAccessors>::i32vec§command_scratch_space: <HistogramCommand as CostAccessors>::i32vec§distance_scratch_space: <HistogramDistance as CostAccessors>::i32vec§recoder_state: RecoderState

Implementations§

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn set_parameter(&mut self, p: BrotliEncoderParameter, value: u32) -> bool

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn new(m8: Alloc) -> Self

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn copy_input_to_ring_buffer( &mut self, input_size: usize, input_buffer: &[u8], )

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn set_custom_dictionary(&mut self, size: usize, dict: &[u8])

source

pub fn set_custom_dictionary_with_optional_precomputed_hasher( &mut self, size: usize, dict: &[u8], opt_hasher: UnionHasher<Alloc>, )

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn compress_stream<MetablockCallback: FnMut(&mut PredictionModeContextMap<InputReferenceMut<'_>>, &mut [StaticCommand], InputPair<'_>, &mut Alloc)>( &mut self, op: BrotliEncoderOperation, available_in: &mut usize, next_in_array: &[u8], next_in_offset: &mut usize, available_out: &mut usize, next_out_array: &mut [u8], next_out_offset: &mut usize, total_out: &mut Option<usize>, metablock_callback: &mut MetablockCallback, ) -> bool

source

pub fn is_finished(&self) -> bool

source

pub fn has_more_output(&self) -> bool

source

pub fn take_output(&mut self, size: &mut usize) -> &[u8]

source§

impl<Alloc: BrotliAlloc> BrotliEncoderStateStruct<Alloc>

source

pub fn input_block_size(&mut self) -> usize

source

pub fn write_data<'a, MetablockCallback: FnMut(&mut PredictionModeContextMap<InputReferenceMut<'_>>, &mut [StaticCommand], InputPair<'_>, &mut Alloc)>( &'a mut self, is_last: i32, force_flush: i32, out_size: &mut usize, output: &'a mut &'a mut [u8], metablock_callback: &mut MetablockCallback, ) -> bool

Auto Trait Implementations§

§

impl<Alloc> Freeze for BrotliEncoderStateStruct<Alloc>

§

impl<Alloc> RefUnwindSafe for BrotliEncoderStateStruct<Alloc>

§

impl<Alloc> Send for BrotliEncoderStateStruct<Alloc>
where Alloc: Send, <Alloc as Allocator<Command>>::AllocatedMemory: Send, <Alloc as Allocator<u8>>::AllocatedMemory: Send, <Alloc as Allocator<i32>>::AllocatedMemory: Send, <Alloc as Allocator<u32>>::AllocatedMemory: Send, <Alloc as Allocator<u16>>::AllocatedMemory: Send,

§

impl<Alloc> Sync for BrotliEncoderStateStruct<Alloc>
where Alloc: Sync, <Alloc as Allocator<Command>>::AllocatedMemory: Sync, <Alloc as Allocator<u8>>::AllocatedMemory: Sync, <Alloc as Allocator<i32>>::AllocatedMemory: Sync, <Alloc as Allocator<u32>>::AllocatedMemory: Sync, <Alloc as Allocator<u16>>::AllocatedMemory: Sync,

§

impl<Alloc> Unpin for BrotliEncoderStateStruct<Alloc>

§

impl<Alloc> UnwindSafe for BrotliEncoderStateStruct<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.