pub struct Dictionary { /* private fields */ }Expand description
A decompression dictionary, parsed once and reused for many frames.
Implementations§
Source§impl Dictionary
impl Dictionary
Sourcepub fn new(data: &[u8]) -> Result<Dictionary, Error>
pub fn new(data: &[u8]) -> Result<Dictionary, Error>
Parses a dictionary like libzstd’s ZSTD_dct_auto: data that starts
with the dictionary magic number is a zstd dictionary (ID, entropy
tables, repeat offsets, content); anything else is raw content.
§Errors
Error::InvalidDictionary if a zstd-format dictionary is corrupt.
Sourcepub fn raw(data: &[u8]) -> Dictionary
pub fn raw(data: &[u8]) -> Dictionary
A raw content dictionary (ID 0): data is only history for matches.
Trait Implementations§
Source§impl Clone for Dictionary
impl Clone for Dictionary
Auto Trait Implementations§
impl Freeze for Dictionary
impl RefUnwindSafe for Dictionary
impl Send for Dictionary
impl Sync for Dictionary
impl Unpin for Dictionary
impl UnsafeUnpin for Dictionary
impl UnwindSafe for Dictionary
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