pub struct DecodePolicy { /* private fields */ }Expand description
Controls resource limits and which ZIP features ZipArchive::open_with_policy accepts.
Implementations§
Source§impl DecodePolicy
impl DecodePolicy
Sourcepub fn extra_field_policy(self, policy: ExtraFieldPolicy) -> Self
pub fn extra_field_policy(self, policy: ExtraFieldPolicy) -> Self
Sets the extra-field policy for both central and local headers.
Sourcepub fn comment_policy(self, policy: CommentPolicy) -> Self
pub fn comment_policy(self, policy: CommentPolicy) -> Self
Sets the CommentPolicy for member and archive comments.
Sourcepub fn allow_redundant_zip64_sizes(self, allow: bool) -> Self
pub fn allow_redundant_zip64_sizes(self, allow: bool) -> Self
Allows redundant local ZIP64 sizes. Disabled by default.
Sourcepub fn allow_stored_data_descriptors(self, allow: bool) -> Self
pub fn allow_stored_data_descriptors(self, allow: bool) -> Self
Sourcepub fn allow_empty_deflate_streams(self, allow: bool) -> Self
pub fn allow_empty_deflate_streams(self, allow: bool) -> Self
Allows empty DEFLATE streams.
This is enabled by default for compatibility with ZIP emitters that write a valid DEFLATE stream for an empty member. Disable it to require zero compressed bytes for empty DEFLATE members under APPNOTE §4.3.8.
Sourcepub fn allow_incompatible_extraction_versions(self, allow: bool) -> Self
pub fn allow_incompatible_extraction_versions(self, allow: bool) -> Self
Allows member headers to declare an extraction version below the required minimum. Disabled by default. Versions above 4.5 remain unsupported.
Sourcepub fn allow_ambiguous_symlink_modes(self, allow: bool) -> Self
pub fn allow_ambiguous_symlink_modes(self, allow: bool) -> Self
Sourcepub fn allow_backslashes(self, allow: bool) -> Self
pub fn allow_backslashes(self, allow: bool) -> Self
Allows literal backslashes in member names.
Disabled by default. Member names are returned verbatim. The filesystem extractor rejects paths containing backslashes.