Struct vpk0::LzssSettings [−][src]
Configure the LZSS encoding that underlies vpk0
compression
You can set the three key LZSS parameters: dictionary size, maximum match size,
and minimum match size. When using new
or struct
literals, you are setting the total number of bits for the dictionary or max match,
but the minimum match size is in bytes. If you’d prefer to set everything in terms
of bytes, you can use byte_sized
. Note that any
non-power-of-two byte sizes will be rounded up for the dictionary and max match.
By default
:
Parameter | Field | Bit Size | Bytes |
---|---|---|---|
Dictionary | offset_bits | 16 | 65536 |
Max Match | length_bits | 8 | 256 |
Min Match | max_uncoded | 2 |
These settings were used by Nintendo when compressing the files in Super Smash Bros. 64.
Fields
offset_bits: usize
number of bits for move back (window size)
length_bits: usize
number of bits for copying (max match encoded)
max_uncoded: usize
max number of bytes not encoded
Implementations
impl LzssSettings
[src]
pub const fn new(
offset_bits: usize,
size_bits: usize,
max_uncoded: usize
) -> Self
[src]
offset_bits: usize,
size_bits: usize,
max_uncoded: usize
) -> Self
pub const fn byte_sized(
dictionary: usize,
max_match: usize,
min_match: usize
) -> Self
[src]
dictionary: usize,
max_match: usize,
min_match: usize
) -> Self
Trait Implementations
impl Clone for LzssSettings
[src]
fn clone(&self) -> LzssSettings
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LzssSettings
[src]
impl Debug for LzssSettings
[src]
impl Default for LzssSettings
[src]
impl Eq for LzssSettings
[src]
impl PartialEq<LzssSettings> for LzssSettings
[src]
fn eq(&self, other: &LzssSettings) -> bool
[src]
fn ne(&self, other: &LzssSettings) -> bool
[src]
impl StructuralEq for LzssSettings
[src]
impl StructuralPartialEq for LzssSettings
[src]
Auto Trait Implementations
impl RefUnwindSafe for LzssSettings
impl Send for LzssSettings
impl Sync for LzssSettings
impl Unpin for LzssSettings
impl UnwindSafe for LzssSettings
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,