pub struct DictionarySizes {
pub content: usize,
pub serialized: usize,
}Expand description
The sizes of a dictionary handed to Matcher::set_dictionary_size_hint.
Upstream picks the CDict’s cParams tier from the size of the serialized
dictionary buffer (ZSTD_createCDict(dictBuffer, dictSize, level), header
and entropy tables included), while the dictionary tables and the attach
cutoffs are sized from the content that is actually indexed.
§Examples
use structured_zstd::encoding::DictionarySizes;
let sizes = DictionarySizes::raw_content(4096);
assert_eq!(sizes.serialized, sizes.content);Fields§
§content: usizeBytes of dictionary content the matcher indexes.
serialized: usizeBytes of the serialized dictionary (the CDict cParams tier key); equal
to content for a raw-content dictionary.
Implementations§
Source§impl DictionarySizes
impl DictionarySizes
Sourcepub const fn raw_content(len: usize) -> Self
pub const fn raw_content(len: usize) -> Self
Sizes of a raw-content dictionary: nothing but the content is serialized.
Trait Implementations§
Source§impl Clone for DictionarySizes
impl Clone for DictionarySizes
Source§fn clone(&self) -> DictionarySizes
fn clone(&self) -> DictionarySizes
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DictionarySizes
Source§impl Debug for DictionarySizes
impl Debug for DictionarySizes
impl Eq for DictionarySizes
Source§impl PartialEq for DictionarySizes
impl PartialEq for DictionarySizes
impl StructuralPartialEq for DictionarySizes
Auto Trait Implementations§
impl Freeze for DictionarySizes
impl RefUnwindSafe for DictionarySizes
impl Send for DictionarySizes
impl Sync for DictionarySizes
impl Unpin for DictionarySizes
impl UnsafeUnpin for DictionarySizes
impl UnwindSafe for DictionarySizes
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