async_zip/lib.rs
1// Copyright (c) 2021-2023 Harry [Majored] [hello@majored.pw]
2// MIT License (https://github.com/Majored/rs-async-zip/blob/main/LICENSE)
3
4// Document all features on docs.rs
5#![cfg_attr(docsrs, feature(doc_cfg))]
6
7//! An asynchronous ZIP archive reading/writing crate.
8//!
9//! ## Features
10//! - A base implementation atop `futures`'s IO traits.
11//! - An extended implementation atop `tokio`'s IO traits.
12//! - Support for Stored, Deflate, bzip2, LZMA, zstd, and xz compression methods.
13//! - Various different reading approaches (seek, stream, filesystem, in-memory buffer).
14//! - Support for writing complete data (u8 slices) or stream writing using data descriptors.
15//! - Initial support for ZIP64 reading and writing.
16//! - Aims for reasonable [specification](https://github.com/Majored/rs-async-zip/blob/main/SPECIFICATION.md) compliance.
17//!
18//! ## Installation
19//!
20//! ```toml
21//! [dependencies]
22//! async_zip = { version = "0.0.17", features = ["full"] }
23//! ```
24//!
25//! ### Feature Flags
26//! - `full` - Enables all below features.
27//! - `full-wasm` - Enables all below features that are compatible with WASM.
28//! - `chrono` - Enables support for parsing dates via `chrono`.
29//! - `tokio` - Enables support for the `tokio` implementation module.
30//! - `tokio-fs` - Enables support for the `tokio::fs` reading module.
31//! - `deflate` - Enables support for the Deflate compression method.
32//! - `bzip2` - Enables support for the bzip2 compression method.
33//! - `lzma` - Enables support for the LZMA compression method.
34//! - `zstd` - Enables support for the zstd compression method.
35//! - `xz` - Enables support for the xz compression method.
36//!
37//! [Read more.](https://github.com/Majored/rs-async-zip)
38
39pub mod base;
40pub mod error;
41
42#[cfg(feature = "tokio")]
43pub mod tokio;
44
45pub(crate) mod date;
46pub(crate) mod entry;
47pub(crate) mod file;
48pub(crate) mod spec;
49pub(crate) mod string;
50pub(crate) mod utils;
51
52#[cfg(test)]
53pub(crate) mod tests;
54
55pub use crate::spec::attribute::AttributeCompatibility;
56pub use crate::spec::compression::{Compression, DeflateOption};
57
58pub use crate::date::ZipDateTime;
59pub use crate::entry::{StoredZipEntry, ZipEntry};
60pub use crate::file::ZipFile;
61
62pub use crate::string::{StringEncoding, ZipString};