1zip-rs
2======
3
4[![Build Status](https://img.shields.io/github/workflow/status/zip-rs/zip/CI)](https://github.com/zip-rs/zip/actions?query=branch%3Amaster+workflow%3ACI)
5[![Crates.io version](https://img.shields.io/crates/v/zip.svg)](https://crates.io/crates/zip)
6[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/rQ7H9cSsF4)
7
8[Documentation](https://docs.rs/zip/0.6.3/zip/)
9
10Info
11----
12
13
14A zip library for rust which supports reading and writing of simple ZIP files.
15
16Supported compression formats:
17
18* stored (i.e. none)
19* deflate
20* bzip2
21* zstd
22
23Currently unsupported zip extensions:
24
25* Encryption
26* Multi-disk
27
28Usage
29-----
30
31With all default features:
32
33```toml
34[dependencies]
35zip = "0.6"
36```
37
38Without the default features:
39
40```toml
41[dependencies]
42zip = { version = "0.6.6", default-features = false }
43```
44
45The features available are:
46
47* `aes-crypto`: Enables decryption of files which were encrypted with AES. Supports AE-1 and AE-2 methods.
48* `deflate`: Enables the deflate compression algorithm, which is the default for zip files.
49* `bzip2`: Enables the BZip2 compression algorithm.
50* `time`: Enables features using the [time](https://github.com/rust-lang-deprecated/time) crate.
51* `zstd`: Enables the Zstandard compression algorithm.
52
53All of these are enabled by default.
54
55MSRV
56----
57
58Our current Minimum Supported Rust Version is **1.59.0**. When adding features,
59we will follow these guidelines:
60
61- We will always support the latest four minor Rust versions. This gives you a 6
62  month window to upgrade your compiler.
63- Any change to the MSRV will be accompanied with a **minor** version bump
64   - While the crate is pre-1.0, this will be a change to the PATCH version.
65
66Examples
67--------
68
69See the [examples directory](examples) for:
70   * How to write a file to a zip.
71   * How to write a directory of files to a zip (using [walkdir](https://github.com/BurntSushi/walkdir)).
72   * How to extract a zip file.
73   * How to extract a single file from a zip.
74   * How to read a zip from the standard input.
75
76Fuzzing
77-------
78
79Fuzzing support is through [cargo fuzz](https://github.com/rust-fuzz/cargo-fuzz). To install cargo fuzz:
80
81```bash
82cargo install cargo-fuzz
83```
84
85To list fuzz targets:
86
87```bash
88cargo +nightly fuzz list
89```
90
91To start fuzzing zip extraction:
92
93```bash
94cargo +nightly fuzz run fuzz_read
95```
96