Expand description
High-level encoding and decoding for ZIP archives.
See decode for ZIP decoding, encode for ZIP64 encoding,
Builder for format-neutral construction, and
Archive::extract_in for format-neutral extraction.
§Security and correctness
See the repository’s SECURITY.md for more information.
Re-exports§
pub use decode::DecodeError;pub use decode::DecodePolicy;pub use decode::ZipArchive;pub use decode::ZipMemberPayload;pub use encode::EncodeError;pub use encode::EncodeLimits;pub use encode::ZipEncoder;pub use encode::ZipFileOptions;
Modules§
- builder
- Format-neutral archive construction.
- decode
- ZIP member projection and seekable archive access.
- encode
- Streaming ZIP64 encoding.
- extract
- Format-neutral archive extraction.
Structs§
- Builder
- A stateful format-neutral archive construction engine.
- Central
Directory Entry - Metadata retained from a member’s central directory entry.
- Comment
Policy - Which comments the reader accepts in member and end records.
- Device
Numbers - Device numbers from a PKWARE UNIX extra field.
- Entry
- A member whose local file entry, extras, and optional data descriptor have been reconciled with the directory and checked for a consistent kind.
- Entry
Metadata - Minimal regular-file metadata accepted by
Builder. - Extra
Header IdSet - A set of known ZIP extra-field identifiers for
ExtraFieldPolicy::AllowListed. - File
Payload - A format-neutral, uncompressed file payload supplied to an
ArchiveBuilderimplementation. - Indexed
Entry - An indexed ZIP member and its central directory entry.
- Lent
Payload - A member payload that keeps its lending
Memberscursor borrowed. - Limits
- Limits applied when reading ZIP archives.
- Member
Metadata - Common metadata for one archive member.
- Members
- A consuming, lending member cursor.
Enums§
- Build
Error - A failure while constructing an archive.
- Comment
Rule - Which ZIP comment bytes the reader accepts. Empty comments are always accepted.
- Compression
Method - A supported ZIP compression method.
- Entry
Kind - A ZIP member’s kind, determined from its reconciled metadata.
- Extra
Field Policy - Which extra fields a reader accepts in local and central member headers.
- Extra
Header Id - A supported ZIP member extra-field identifier. The discriminant is the wire value.
- Extract
Error - An error produced while securely extracting an archive.
- Extract
Policy Violation - A valid member feature rejected by the selected
extract::ExtractPolicy. - Host
System - The host-system interpretation of a ZIP member’s external attributes.
- Index
Policy Violation - A supported ZIP feature excluded by the selected
IndexPolicy. - Limit
Exceeded - A ZIP resource limit and its configured maximum.
- Member
- One format-neutral archive member.
- Special
Kind - A special-file kind that generic extraction deliberately rejects.
- Traversal
Error - A failure while traversing a recursive archive source.
Traits§
- Archive
- A one-pass archive that can enumerate and extract format-neutral members.
- Archive
Builder - A format-specific archive writer that can create a stateful
Builder. - Member
Payload - A streaming cursor over one archive member’s payload.
Functions§
- default_
name_ validator - Applies the default archive name policy.
Type Aliases§
- Name
Validator - A predicate that accepts or rejects one UTF-8 archive name.