Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. zip2

zip2

MITRustv8.6.0

A Rust library for reading and writing ZIP files with support for multiple compression formats and encryption.

GitHubGitHub
355 stars121 forks0 contributors

What is zip2?

zip-rs/zip2 is a pure Rust implementation of the ZIP archive format that enables reading and writing compressed files with various algorithms. It solves the problem of handling ZIP files in Rust applications without relying on external C libraries or system tools. The library supports both common and specialized compression methods along with encryption for secure data packaging.

Target Audience

Rust developers building applications that need to create, extract, or manipulate ZIP archives, including package managers, backup tools, game developers, and data processing pipelines.

Value Proposition

Developers choose this library because it's a native Rust solution with comprehensive format support, active maintenance, and careful adherence to specifications. Its feature-gated architecture allows minimal binary sizes, and it offers better safety guarantees compared to FFI-based alternatives.

Overview

Zip implementation in Rust

Use Cases

Best For

  • Creating ZIP archives programmatically in Rust applications
  • Extracting files from ZIP archives with various compression formats
  • Building command-line tools for archive manipulation
  • Processing ZIP files in WebAssembly environments
  • Implementing secure archives with AES encryption
  • Handling legacy ZIP formats in modernization projects

Not Ideal For

  • Applications needing to write archives with legacy compression formats like Implode or Shrink (read-only support only)
  • Projects requiring multi-disk ZIP archive handling (explicitly unsupported)
  • Teams seeking a zero-configuration library without managing feature flags (due to extensive feature gating)

Pros & Cons

Pros

Broad Format Support

Supports reading and writing with multiple compression algorithms including Deflate, Bzip2, ZStandard, and XZ, as detailed in the compatibility table, ensuring wide archive compatibility.

Encryption Capabilities

Includes both modern AES encryption and legacy ZipCrypto, enabling secure archive creation and extraction through feature flags like `aes-crypto`.

Streaming API

Allows reading from and writing to streams without full file buffers, as shown with `read_zipfile_from_stream_*` and `ZipWriter::new_stream()`, ideal for memory-efficient processing.

WASM Readiness

Configurable for WebAssembly environments by disabling certain features, with explicit examples in the README for minimal builds.

Specification Adherence

Strictly follows PKWARE's APPNOTE.TXT v6.3.9, ensuring correctness and interoperability, backed by fuzzing tests for robustness.

Cons

Partial Write Support

Some compression formats like Deflate64 and LZMA are read-only, limiting writing capabilities for those algorithms as noted in the compatibility table.

Feature Management Complexity

Extensive feature gating requires careful configuration in Cargo.toml, which can complicate setup for developers needing specific combinations or minimizing dependencies.

Missing Multi-Disk Support

Does not support multi-disk ZIP archives, restricting use for very large archives split across multiple files, as admitted in the unsupported extensions section.

External Dependencies

Relies on external crates like `time` or `chrono` for datetime handling via feature flags, adding potential bloat if not needed and increasing dependency management overhead.

Frequently Asked Questions

Quick Stats

Stars355
Forks121
Contributors0
Open Issues44
Last commit23 hours ago
CreatedSince 2023

Tags

#no-std-optional#encryption#streaming#rust-library#data-processing#compression

Built With

R
Rust

Included in

Rust56.6k
Auto-fetched 23 hours ago

Related Projects

flate2-rsflate2-rs

DEFLATE, gzip, and zlib bindings for Rust

Stars1,126
Forks204
Last commit2 days ago
rust-brotlirust-brotli

Brotli compressor and decompressor written in rust that optionally avoids the stdlib

Stars944
Forks109
Last commit1 month ago
tar-rstar-rs

Tar file reading/writing for Rust

Stars740
Forks252
Last commit15 days ago
zstd-rszstd-rs

A rust binding for the zstd compression library.

Stars659
Forks140
Last commit27 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub