s_zip/lib.rs
1//! # s-zip: High-Performance Streaming ZIP Library
2//!
3//! `s-zip` is a lightweight, high-performance ZIP library focused on streaming operations
4//! with minimal memory footprint. Perfect for working with large ZIP files without loading
5//! everything into memory.
6//!
7//! ## Features
8//!
9//! - **Streaming Read**: Read ZIP entries on-the-fly without loading entire archive
10//! - **Streaming Write**: Write ZIP files with on-the-fly compression, no temp files
11//! - **Low Memory**: Constant memory usage regardless of ZIP file size
12//! - **Fast**: Optimized for performance with minimal allocations
13//! - **Simple API**: Easy to use, intuitive interface
14//!
15//! ## Quick Start
16//!
17//! ### Reading a ZIP file
18//!
19//! ```no_run
20//! use s_zip::StreamingZipReader;
21//!
22//! let mut reader = StreamingZipReader::open("archive.zip")?;
23//!
24//! // List all entries
25//! for entry in reader.entries() {
26//! println!("{}: {} bytes", entry.name, entry.uncompressed_size);
27//! }
28//!
29//! // Read a specific file
30//! let data = reader.read_entry_by_name("file.txt")?;
31//! # Ok::<(), s_zip::SZipError>(())
32//! ```
33//!
34//! ### Writing a ZIP file
35//!
36//! ```no_run
37//! use s_zip::StreamingZipWriter;
38//!
39//! let mut writer = StreamingZipWriter::new("output.zip")?;
40//!
41//! writer.start_entry("file1.txt")?;
42//! writer.write_data(b"Hello, World!")?;
43//!
44//! writer.start_entry("file2.txt")?;
45//! writer.write_data(b"Another file")?;
46//!
47//! writer.finish()?;
48//! # Ok::<(), s_zip::SZipError>(())
49//! ```
50
51pub mod error;
52pub mod reader;
53pub mod writer;
54
55pub use error::{Result, SZipError};
56pub use reader::{StreamingZipReader, ZipEntry};
57pub use writer::StreamingZipWriter;