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
impl Clone for WindowSize
source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WindowSize
impl Debug for WindowSize
source§impl Hash for WindowSize
impl Hash for WindowSize
source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
source§fn eq(&self, other: &WindowSize) -> bool
fn eq(&self, other: &WindowSize) -> bool
self
and other
values to be equal, and is used
by ==
.