pub struct DecompressOptions {
pub window_max: u64,
pub force_ignore_checksum: bool,
}Expand description
Decoder knobs for decompress_with.
Fields§
§window_max: u64Reject frames whose window exceeds this (bytes). Default 128 MiB.
force_ignore_checksum: boolSkip XXH64 content-checksum VERIFICATION (ZSTD_d_forceIgnoreChecksum).
The 4 checksum bytes are still consumed, so concatenated frames keep
parsing; only the comparison is skipped. Default false.
This is a real cost, not a micro-optimisation: xxh64 over the output is the majority of decode time on high-ratio content (measured 61% on a 32 MiB all-zeros frame – 7792 MB/s with verification, 20150 without). Set this only where the transport already guarantees integrity; it disables the frame’s own corruption detection.
Trait Implementations§
Source§impl Clone for DecompressOptions
impl Clone for DecompressOptions
Source§fn clone(&self) -> DecompressOptions
fn clone(&self) -> DecompressOptions
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 DecompressOptions
Source§impl Debug for DecompressOptions
impl Debug for DecompressOptions
Source§impl Default for DecompressOptions
impl Default for DecompressOptions
impl Eq for DecompressOptions
Source§impl PartialEq for DecompressOptions
impl PartialEq for DecompressOptions
impl StructuralPartialEq for DecompressOptions
Auto Trait Implementations§
impl Freeze for DecompressOptions
impl RefUnwindSafe for DecompressOptions
impl Send for DecompressOptions
impl Sync for DecompressOptions
impl Unpin for DecompressOptions
impl UnsafeUnpin for DecompressOptions
impl UnwindSafe for DecompressOptions
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