Enum lzxd::WindowSize

source ·
#[repr(u32)]
pub enum WindowSize { KB32 = 32_768, KB64 = 65_536, KB128 = 131_072, KB256 = 262_144, KB512 = 524_288, MB1 = 1_048_576, MB2 = 2_097_152, MB4 = 4_194_304, MB8 = 8_388_608, MB16 = 16_777_216, MB32 = 33_554_432, }
Expand description

The window size is not stored in the compressed data stream and must be known before decoding begins.

The window size should be the smallest power of two between 2^17 and 2^25 that is greater than or equal to the sum of the size of the reference data rounded up to a multiple of 32_768 and the size of the subject data. However, some implementations also seem to support a window size of less than 2^17, and this one is no exception.

Variants§

§

KB32 = 32_768

Window size of 32 KB (2^15 bytes).

§

KB64 = 65_536

Window size of 64 KB (2^16 bytes).

§

KB128 = 131_072

Window size of 128 KB (2^17 bytes).

§

KB256 = 262_144

Window size of 256 KB (2^18 bytes).

§

KB512 = 524_288

Window size of 512 KB (2^19 bytes).

§

MB1 = 1_048_576

Window size of 1 MB (2^20 bytes).

§

MB2 = 2_097_152

Window size of 2 MB (2^21 bytes).

§

MB4 = 4_194_304

Window size of 4 MB (2^22 bytes).

§

MB8 = 8_388_608

Window size of 8 MB (2^23 bytes).

§

MB16 = 16_777_216

Window size of 16 MB (2^24 bytes).

§

MB32 = 33_554_432

Window size of 32 MB (2^25 bytes).

Trait Implementations§

source§

impl Clone for WindowSize

source§

fn clone(&self) -> WindowSize

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 WindowSize

source§

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

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

impl Hash for WindowSize

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for WindowSize

source§

fn eq(&self, other: &WindowSize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for WindowSize

source§

impl Eq for WindowSize

source§

impl StructuralEq for WindowSize

source§

impl StructuralPartialEq for WindowSize

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.