zip-rs

Build Status Crates.io version Discord

Documentation

PSA: This version of the ZIP crate will not gain any new features, and will only be updated if major security issues are found.

Info

A zip library for rust which supports reading and writing of simple ZIP files.

Supported compression formats:

Currently unsupported zip extensions:

Usage

With all default features:

toml [dependencies] zip = "0.6.4"

Without the default features:

toml [dependencies] zip = { version = "0.6.4", default-features = false }

The features available are:

All of these are enabled by default.

MSRV

Our current Minimum Supported Rust Version is 1.59.0. When adding features, we will follow these guidelines:

Examples

See the examples directory for: * How to write a file to a zip. * How to write a directory of files to a zip (using walkdir). * How to extract a zip file. * How to extract a single file from a zip. * How to read a zip from the standard input.

Fuzzing

Fuzzing support is through cargo fuzz. To install cargo fuzz:

bash cargo install cargo-fuzz

To list fuzz targets:

bash cargo +nightly fuzz list

To start fuzzing zip extraction:

bash cargo +nightly fuzz run fuzz_read