Skip to main content

Sequences

Struct Sequences 

Source
pub struct Sequences<'a> {
    pub table: &'a [SeqEntry; 2048],
    pub logs: [u32; 3],
    pub bits: &'a [u8],
    pub n: usize,
    pub lits: &'a [u8],
    pub out: &'a mut [u8],
    pub start: usize,
    pub reps: [u32; 3],
    pub wmax: usize,
    pub hist: usize,
}
Expand description

The inputs of zstd_sequences.

Fields§

§table: &'a [SeqEntry; 2048]

Literal lengths at 0, offsets at 512, match lengths at 1024 (next states absolute).

§logs: [u32; 3]

Accuracy logs of the three tables (each at most 9).

§bits: &'a [u8]

The sequences bitstream; at least 8 bytes, the last one non-zero.

§n: usize

Number of sequences, at least 1.

§lits: &'a [u8]

The block’s literals followed by WILD bytes of slack.

§out: &'a mut [u8]

The output: decoding writes from start on; the last WILD bytes are slack, so the block may produce out.len() - WILD - start bytes.

§start: usize§reps: [u32; 3]§wmax: usize

The largest offset allowed (the window).

§hist: usize

History before start that offsets may reach, relative to start (wrapping): an offset must be at most hist + (position - start).

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for Sequences<'a>

§

impl<'a> Forget for Sequences<'a>

§

impl<'a> Freeze for Sequences<'a>

§

impl<'a> Move for Sequences<'a>

§

impl<'a> RefUnwindSafe for Sequences<'a>

§

impl<'a> Send for Sequences<'a>

§

impl<'a> Sync for Sequences<'a>

§

impl<'a> Unpin for Sequences<'a>

§

impl<'a> UnsafeUnpin for Sequences<'a>

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.