DeflateInput

Trait DeflateInput 

Source
pub trait DeflateInput {
    const MAX_LOOK_BACK: usize = 16usize;
    const MAX_OVERREAD: usize = 16usize;

    // Required methods
    unsafe fn get_le_word_no_advance(&mut self) -> usize;
    fn move_stream_pos<const REFILL: bool>(&mut self, amount: isize);
    fn get_stream_pos_mut(&mut self) -> &mut usize;
    fn tell_stream_pos(&self) -> usize;
    fn read<const REFILL: bool>(&mut self, out_data: &mut [u8]) -> usize;
    fn ensure_overread_length(&mut self);
    fn has_readable_overread(&self) -> bool;
    fn has_valid_bytes_slow(&mut self) -> bool;
    fn read_exact_into<O: DeflateOutput>(
        &mut self,
        out_stream: &mut O,
        length: usize,
    ) -> bool;

    // Provided methods
    fn read_byte<const REFILL: bool>(&mut self) -> u8 { ... }
    fn read_le_u16<const REFILL: bool>(&mut self) -> u16 { ... }
    fn read_le_u32<const REFILL: bool>(&mut self) -> u32 { ... }
}

Provided Associated Constants§

Source

const MAX_LOOK_BACK: usize = 16usize

Source

const MAX_OVERREAD: usize = 16usize

Required Methods§

Source

unsafe fn get_le_word_no_advance(&mut self) -> usize

Source

fn move_stream_pos<const REFILL: bool>(&mut self, amount: isize)

Source

fn get_stream_pos_mut(&mut self) -> &mut usize

Source

fn tell_stream_pos(&self) -> usize

Source

fn read<const REFILL: bool>(&mut self, out_data: &mut [u8]) -> usize

Source

fn ensure_overread_length(&mut self)

Source

fn has_readable_overread(&self) -> bool

Source

fn has_valid_bytes_slow(&mut self) -> bool

Source

fn read_exact_into<O: DeflateOutput>( &mut self, out_stream: &mut O, length: usize, ) -> bool

Provided Methods§

Source

fn read_byte<const REFILL: bool>(&mut self) -> u8

Source

fn read_le_u16<const REFILL: bool>(&mut self) -> u16

Source

fn read_le_u32<const REFILL: bool>(&mut self) -> u32

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§