pub struct DecoderOptions {
pub strict_literal_bitstream: bool,
}Expand description
Fields§
§strict_literal_bitstream: boolReject Huffman literal streams that do not end exactly on their final bit.
Enabled by default. Disabling it makes the decoder tolerate a truncated literal bitstream by padding the remaining symbols instead of failing, which is only useful for best-effort salvage of damaged data.
§Warning
With this disabled, a corrupt frame can decode “successfully” to bytes that differ from what other zstd implementations produce, with no error reported. Never disable it for content-addressed or otherwise security-sensitive input.
Trait Implementations§
Source§impl Clone for DecoderOptions
impl Clone for DecoderOptions
impl Copy for DecoderOptions
Source§impl Debug for DecoderOptions
impl Debug for DecoderOptions
Source§impl Default for DecoderOptions
impl Default for DecoderOptions
impl Eq for DecoderOptions
Source§impl PartialEq for DecoderOptions
impl PartialEq for DecoderOptions
impl StructuralPartialEq for DecoderOptions
Auto Trait Implementations§
impl Freeze for DecoderOptions
impl RefUnwindSafe for DecoderOptions
impl Send for DecoderOptions
impl Sync for DecoderOptions
impl Unpin for DecoderOptions
impl UnsafeUnpin for DecoderOptions
impl UnwindSafe for DecoderOptions
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