pub struct UnpackOptions {
pub max_decompressed: u64,
pub max_ratio: u64,
pub max_entries: u32,
}Expand description
Options controlling archive extraction safety limits.
Construct with UnpackOptions::default() for strict defaults suitable for
untrusted input. Override individual fields for known-trusted archives that
legitimately exceed the default caps (e.g. packages that vendor large
native dependencies).
Fields§
§max_decompressed: u64Maximum total declared uncompressed size of all entries, in bytes. Archives exceeding this are rejected as potential decompression bombs.
max_ratio: u64Maximum ratio of total declared uncompressed size to compressed archive size. Archives exceeding this are rejected.
max_entries: u32Maximum number of entries in the archive. Guards against archives that exhaust inodes or directory-entry limits via tiny-file spam.
Trait Implementations§
Source§impl Clone for UnpackOptions
impl Clone for UnpackOptions
Source§fn clone(&self) -> UnpackOptions
fn clone(&self) -> UnpackOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnpackOptions
impl Debug for UnpackOptions
Auto Trait Implementations§
impl Freeze for UnpackOptions
impl RefUnwindSafe for UnpackOptions
impl Send for UnpackOptions
impl Sync for UnpackOptions
impl Unpin for UnpackOptions
impl UnsafeUnpin for UnpackOptions
impl UnwindSafe for UnpackOptions
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