pub struct Rar29Decoder { /* private fields */ }Expand description
RAR 2.9 (RAR4) decoder state.
Handles LZSS + Huffman decompression with PPMd fallback and VM-based filters for RAR 1.5–4.x archives.
§Example
use rar_stream::Rar29Decoder;
let mut decoder = Rar29Decoder::new();
// decoder.decompress(&compressed_data, expected_size) to decompressImplementations§
Source§impl Rar29Decoder
impl Rar29Decoder
Sourcepub fn with_window_size(window_size: usize) -> Self
pub fn with_window_size(window_size: usize) -> Self
Create a new RAR29 decoder with specified window size. Window size must be a power of 2.
Sourcepub fn decompress(&mut self, data: &[u8], unpacked_size: u64) -> Result<Vec<u8>>
pub fn decompress(&mut self, data: &[u8], unpacked_size: u64) -> Result<Vec<u8>>
Decompress a block of data. Returns the decompressed data.
Sourcepub fn bytes_written(&self) -> u64
pub fn bytes_written(&self) -> u64
Get total bytes decompressed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rar29Decoder
impl RefUnwindSafe for Rar29Decoder
impl Send for Rar29Decoder
impl Sync for Rar29Decoder
impl Unpin for Rar29Decoder
impl UnsafeUnpin for Rar29Decoder
impl UnwindSafe for Rar29Decoder
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