Struct fsst::Decompressor
source · pub struct Decompressor<'a> { /* private fields */ }
Expand description
Decompressor uses a symbol table to take a stream of 8-bit codes into a string.
Implementations§
source§impl<'a> Decompressor<'a>
impl<'a> Decompressor<'a>
sourcepub fn new(symbols: &'a [Symbol], lengths: &'a [u8]) -> Self
pub fn new(symbols: &'a [Symbol], lengths: &'a [u8]) -> Self
Returns a new decompressor that uses the provided symbol table.
§Panics
If the provided symbol table has length greater than 256
sourcepub fn decompress(&self, compressed: &[u8]) -> Vec<u8>
pub fn decompress(&self, compressed: &[u8]) -> Vec<u8>
Decompress a byte slice that was previously returned by a compressor using the same symbol table.
Trait Implementations§
source§impl<'a> Clone for Decompressor<'a>
impl<'a> Clone for Decompressor<'a>
source§fn clone(&self) -> Decompressor<'a>
fn clone(&self) -> Decompressor<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for Decompressor<'a>
impl<'a> RefUnwindSafe for Decompressor<'a>
impl<'a> Send for Decompressor<'a>
impl<'a> Sync for Decompressor<'a>
impl<'a> Unpin for Decompressor<'a>
impl<'a> UnwindSafe for Decompressor<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)