pub struct LzssDecoder { /* private fields */ }Expand description
LZSS sliding window decoder.
Implementations§
Source§impl LzssDecoder
impl LzssDecoder
Sourcepub fn new(window_size: usize) -> Self
pub fn new(window_size: usize) -> Self
Create a new LZSS decoder with the specified window size.
Sourcepub fn write_literal(&mut self, byte: u8)
pub fn write_literal(&mut self, byte: u8)
Write a literal byte to the output.
Sourcepub fn copy_match(&mut self, distance: u32, length: u32) -> Result<()>
pub fn copy_match(&mut self, distance: u32, length: u32) -> Result<()>
Copy bytes from a previous position in the window.
Sourcepub fn total_written(&self) -> u64
pub fn total_written(&self) -> u64
Get total bytes written.
Sourcepub fn get_byte_at_offset(&self, offset: usize) -> u8
pub fn get_byte_at_offset(&self, offset: usize) -> u8
Get a byte at the specified offset from current position (going back).
Sourcepub fn get_output(&self, start: u64, len: usize) -> Vec<u8> ⓘ
pub fn get_output(&self, start: u64, len: usize) -> Vec<u8> ⓘ
Extract decompressed data from the window. Call this after decompression to get the output.
Auto Trait Implementations§
impl Freeze for LzssDecoder
impl RefUnwindSafe for LzssDecoder
impl Send for LzssDecoder
impl Sync for LzssDecoder
impl Unpin for LzssDecoder
impl UnwindSafe for LzssDecoder
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