Crate zip

Source
Expand description

A library for reading and writing ZIP archives. ZIP is a format designed for cross-platform file “archiving”. That is, storing a collection of files in a single datastream to make them easier to share between computers. Additionally, ZIP is able to compress and encrypt files in its archives.

The current implementation is based on PKWARE’s APPNOTE.TXT v6.3.9


zip has support for the most common ZIP archives found in common use. However, in special cases, there are some zip archives that are difficult to read or write.

This is a list of supported features:

ReadingWriting
Stored
Deflate->->
Deflate64
Bzip2
ZStandard
LZMA
XZ
AES encryption
ZipCrypto deprecated encryption

Re-exports§

pub use crate::read::HasZipMetadata;
pub use crate::read::ZipArchive;
pub use crate::write::ZipWriter;
pub use extra_fields::ExtraField;

Modules§

extra_fields
types for extra fields
read
Types for reading ZIP archives
result
Error types that can be emitted from this library
unstable
Unstable APIs All APIs accessible by importing this module are unstable; They may be changed in patch releases. You MUST use an exact version specifier in Cargo.toml, to indicate the version of this API you’re using:
write
Types for creating ZIP archives

Structs§

DateTime
Representation of a moment in time.

Enums§

AesMode
AES variant used.
CompressionMethod
Identifies the storage format used to compress a file within a ZIP archive.

Constants§

SUPPORTED_COMPRESSION_METHODS
The compression methods which have been implemented.
ZIP64_BYTES_THR
The file size at which a ZIP64 record becomes necessary.
ZIP64_ENTRY_THR
The number of entries within a single zip necessary to allocate a zip64 central directory record.