Struct chd::codecs::HuffmanCodec
source · pub struct HuffmanCodec;
Available on
codec_api
only.Expand description
MAME 8-bit Huffman (huff) decompression codec.
§Format Details
The Huffman codec uses a Huffman-encoded Huffman tree with the the default Huffman settings of
NUM_CODES
: 256MAX_BITS
: 16
The last decoded code from the input buffer may not contain enough bits for a full byte is reconstructed by shifting zero-bits in from the right. See the source code for huffman.rs for more details.
§Buffer Restrictions
Each compressed Huffman hunk decompresses to a hunk-sized chunk. The input buffer must contain exactly enough data to fill the output buffer when decompressed.
Trait Implementations§
source§impl CodecImplementation for HuffmanCodec
impl CodecImplementation for HuffmanCodec
source§impl CompressionCodecType for HuffmanCodec
impl CompressionCodecType for HuffmanCodec
source§fn codec_type(&self) -> CodecType
fn codec_type(&self) -> CodecType
Returns the known
CodecType
that this
codec implements.impl CompressionCodec for HuffmanCodec
Auto Trait Implementations§
impl Freeze for HuffmanCodec
impl RefUnwindSafe for HuffmanCodec
impl Send for HuffmanCodec
impl Sync for HuffmanCodec
impl Unpin for HuffmanCodec
impl UnwindSafe for HuffmanCodec
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more