pub struct Limits {
pub max_entries: u64,
pub max_total_uncompressed: u64,
pub max_entry_uncompressed: u64,
pub max_compression_ratio: f64,
pub ratio_applies_above: u64,
}Expand description
Resource limits applied when opening and reading archives (Section 13.1).
Declared sizes in the ZIP directory are checked when the archive is opened; actual decompressed bytes are checked again while reading, since declared sizes can lie. The defaults match the spec’s reference limits.
Fields§
§max_entries: u64Most entries an archive may declare. Default 100,000.
max_total_uncompressed: u64Most bytes all file entries may declare together. Default 4 GiB.
max_entry_uncompressed: u64Most bytes one entry may hold. Default 1 GiB.
max_compression_ratio: f64Highest uncompressed-to-compressed ratio for one entry. Default 1000.
ratio_applies_above: u64The ratio applies to entries declaring more than this. Default 1 MiB.
Implementations§
Trait Implementations§
impl Copy for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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