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
//! Streaming async ZIP archive writer with per-file deflate compression.
//!
//! This crate provides an asynchronous interface for creating ZIP archives
//! from streams of data. Unlike blocking ZIP writers, entries are written
//! incrementally — each file is compressed and written to the output as it
//! arrives, without buffering the entire archive in memory.
//!
//! # Architecture
//!
//! The crate is organized into three modules:
//!
//! - [`ZipWriter`] — Streaming [`ZipWriter`] and per-entry [`EntryWriter`]
//! - [`Compression`] — Deflate compression level (0-9) (re-exported from `flate2`)
//!
//! # Quick Start
//!
//! ```rust,no_run
//! use async_deflate_zip::ZipWriter;
//! use tokio::io::AsyncWriteExt;
//!
//! # async fn example() {
//! let mut buf = Vec::new();
//! let mut zip = ZipWriter::new(&mut buf);
//!
//! let mut entry = zip.append_file("hello.txt").await.unwrap();
//! entry.write_all(b"Hello, World!").await.unwrap();
//! entry.close().await.unwrap();
//!
//! zip.finalize().await.unwrap();
//! # }
//! ```
pub use ZipError;
pub use Compression;
pub use DirectoryWriter;
pub use EntryWriter;
pub use ZipWriter;