Skip to main content

Crate zip_codec

Crate zip_codec 

Source
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.
CentralDirectoryEntry
Metadata retained from a member’s central directory entry.
CommentPolicy
Which comments the reader accepts in member and end records.
DeviceNumbers
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.
EntryMetadata
Minimal regular-file metadata accepted by Builder.
ExtraHeaderIdSet
A set of known ZIP extra-field identifiers for ExtraFieldPolicy::AllowListed.
FilePayload
A format-neutral, uncompressed file payload supplied to an ArchiveBuilder implementation.
IndexedEntry
An indexed ZIP member and its central directory entry.
LentPayload
A member payload that keeps its lending Members cursor borrowed.
Limits
Limits applied when reading ZIP archives.
MemberMetadata
Common metadata for one archive member.
Members
A consuming, lending member cursor.

Enums§

BuildError
A failure while constructing an archive.
CommentRule
Which ZIP comment bytes the reader accepts. Empty comments are always accepted.
CompressionMethod
A supported ZIP compression method.
EntryKind
A ZIP member’s kind, determined from its reconciled metadata.
ExtraFieldPolicy
Which extra fields a reader accepts in local and central member headers.
ExtraHeaderId
A supported ZIP member extra-field identifier. The discriminant is the wire value.
ExtractError
An error produced while securely extracting an archive.
ExtractPolicyViolation
A valid member feature rejected by the selected extract::ExtractPolicy.
HostSystem
The host-system interpretation of a ZIP member’s external attributes.
IndexPolicyViolation
A supported ZIP feature excluded by the selected IndexPolicy.
LimitExceeded
A ZIP resource limit and its configured maximum.
Member
One format-neutral archive member.
SpecialKind
A special-file kind that generic extraction deliberately rejects.
TraversalError
A failure while traversing a recursive archive source.

Traits§

Archive
A one-pass archive that can enumerate and extract format-neutral members.
ArchiveBuilder
A format-specific archive writer that can create a stateful Builder.
MemberPayload
A streaming cursor over one archive member’s payload.

Functions§

default_name_validator
Applies the default archive name policy.

Type Aliases§

NameValidator
A predicate that accepts or rejects one UTF-8 archive name.