pub struct Decompressor<K> { /* private fields */ }Implementations§
Source§impl<K> Decompressor<K>
impl<K> Decompressor<K>
pub fn new() -> Self
Sourcepub fn get_dict_key(&self) -> Option<&K>
pub fn get_dict_key(&self) -> Option<&K>
Gets the key associated with the loaded dict.
Sourcepub fn load_dict(&mut self, dict: Bytes, key: K) -> Result<()>
pub fn load_dict(&mut self, dict: Bytes, key: K) -> Result<()>
Loads the given dict and associates it with the given key, whose meaning is user-defined. Only frames with a matching key should be decompressed with this dict.
Sourcepub fn decompress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes>
pub fn decompress_with_loaded_dict(&mut self, frame: &[u8]) -> Result<Bytes>
Decompresses the given frame using the previously loaded dict, if any.
Sourcepub fn decompress_with_dict_reset(&mut self, frame: &[u8]) -> Result<Bytes>
pub fn decompress_with_dict_reset(&mut self, frame: &[u8]) -> Result<Bytes>
Decompresses the given frame after resetting dict.
Trait Implementations§
Auto Trait Implementations§
impl<K> !Freeze for Decompressor<K>
impl<K> RefUnwindSafe for Decompressor<K>where
K: RefUnwindSafe,
impl<K> Send for Decompressor<K>where
K: Send,
impl<K> Sync for Decompressor<K>where
K: Sync,
impl<K> Unpin for Decompressor<K>where
K: Unpin,
impl<K> UnwindSafe for Decompressor<K>where
K: UnwindSafe,
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