Struct vpk0::LzssSettings
source · [−]Expand description
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
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more