1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! An simple yet flexible zip library.
//!
//! This crate provides tools to read and write ZIP archives. It aims at being
//! nice to use for developpers, which includes a good and flexible API,
//! readable source code and clean maintenance.
//!
//! Given how loose the ZIP spec is about what is a valid ZIP file and the
//! history of security issues around them, this crate also aims at being robust
//! and secure against malicious input. It might therefore may reject some
//! "technically valid" ZIP files. If your ZIP file does not validate but you
//! think it should, feel free to file an issue.
//!
//! See [`Archive`] for reading archives and [`ArchiveWriter`] for creating ones.
//!
//! # Cargo features
//!
//! - `std`: mandatory feature for forward-compatibility.
//! - `deflate`: enable deflate compression and decompression.
//! - `zstd`: enable zstd compression and decompression.
//! - `parallel`: enable parallel ZIP file extraction.
//!
//! # Example
//!
//! ```no_run
//! use std::io;
//!
//! // Open a ZIP archive from a file path
//! let mut archive = eazip::Archive::open("example.zip")?;
//!
//! // Print some metadata for every entry in the archive
//! for entry in archive.entries() {
//! println!("File \"{}\" of type {:?} and compressed size {}", entry.name(), entry.file_type, entry.compressed_size);
//! }
//!
//! // Print the content of the file "hello.txt"
//! let mut hello = archive.get_by_name("hello.txt").ok_or(io::ErrorKind::NotFound)?;
//! let content = io::read_to_string(hello.read()?)?;
//!
//! println!("Content of hello.txt: {content}");
//! # Ok::<(), io::Error>(())
//! ```
compile_error!;
pub use ;
pub use Archive;
pub use ;
pub use ArchiveWriter;