zip

A Rust library for reading and writing ZIP archives with broad compression and encryption support

Library
Cargo
v9.0.5
376 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
89 /100 Excellent
Development Activity 100
Maintenance 100
Community 76
Maturity 52
Momentum 28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
75 /100 Good
Architecture 80
Code Quality 82
Innovation 70
Learning Curve 68

zip is a Rust crate implementing the PKWARE ZIP file format (per APPNOTE.TXT v6.3.9), providing both a ZipArchive reader and a ZipWriter for creating and appending to ZIP files. It supports a wide range of compression methods behind feature flags — Stored, Deflate (via a built-in implementation, flate2, or the higher-ratio zopfli), Deflate64, Bzip2, LZMA, XZ, PPMd, and Zstandard — as well as AES and legacy ZipCrypto encryption for both reading and writing protected archives.

Published on crates.io as zip (the repository itself is named zip2, reflecting a fork/continuation of the original zip-rs project under new maintainers), it’s one of the most widely used Rust crates for ZIP handling, supporting streaming reads, in-place archive merging, and WASM targets with a reduced feature set.

What You Get

  • ZipArchive::new() for random-access reading of existing ZIP files, plus streaming readers for processing archives from stdin or a network stream
  • ZipWriter::new(), new_append(), and new_stream() for creating, appending to, or streaming new ZIP archives
  • Feature-gated support for Stored, Deflate, Deflate64, Bzip2, LZMA, XZ, PPMd, and Zstandard compression methods
  • AES (AE-1/AE-2) and legacy ZipCrypto encryption and decryption support
  • A merge_archive() API for combining archives, and WASM compatibility with a reduced default feature set

Common Use Cases

  • Building CLI or GUI archive tools that need to read, extract, or create ZIP files in Rust
  • Packaging build artifacts, game assets, or application bundles into ZIP archives programmatically
  • Implementing servers or CLIs that stream ZIP contents in or out without buffering the entire archive in memory
  • Handling password-protected ZIP files that use AES or legacy ZipCrypto encryption

Under The Hood

Architecture: The crate is organized around src/read/ (containing zip_archive.rs, zipfile.rs, readers.rs, stream.rs, and magic_finder.rs for locating the end-of-central-directory record) and a single large src/write.rs (over 4,500 lines) implementing ZipWriter; shared format concerns live in src/format/, src/spec.rs, and src/types.rs, while each compression backend is isolated so features can be toggled independently. src/legacy/ and src/extra_fields/ handle backward-compatible extension parsing (NTFS timestamps, Unix permissions, Zip64) — reflecting the format’s long history of vendor extensions that a spec-compliant reader must tolerate. Tech Stack: Modern Rust (2024 edition, MSRV 1.88) with an unusually large, all-optional dependency surface (flate2, bzip2, lzma-rs-style crates, zstd, ppmd-rust, aes, hmac, pbkdf2, sha1, constant_time_eq for encryption) gated behind Cargo features so consumers pull in only the codecs they need; indexmap and memchr support the central-directory index and byte-scanning respectively. Code Quality: The project runs continuous AFL-based fuzzing against both its read and write paths (documented fuzzing workflows for fuzz_read/fuzz_write using cargo afl and arbitrary), a strong signal for a format-parsing library that must safely handle adversarial or corrupted input; a benches/ directory and tests/ suite with real ZIP fixture files under multiple licenses further exercise compatibility against files produced by other tools. API Design: Reading and writing are cleanly separated (ZipArchive vs ZipWriter) and encryption/compression are opt-in via FileOptions, so a minimal build can support just Stored/Deflate while advanced users layer in AES, Zstandard, or PPMd without changing call sites — the tradeoff is that consumers must understand which Cargo features to enable to get support for archives produced by other tools (e.g. 7-Zip’s PPMd-compressed ZIPs).

Used by 24 apps in this directory

Rust
86%
Apache 2.0

mesh-llm

AI Agents · AI Development

3,551

Mesh LLM pools GPUs and memory across every machine you own into one OpenAI-compatible API, so agents tap distributed compute instead of a single GPU box or a metered cloud bill.

View details
85
Repo Health
91
Technical
69
Dependency
Built with
Rust 86%
TypeScript 10%
Updated 5 days ago
Rust
43%
BSD 3

MicroBin

File Storage

4,622

A self-contained, encrypted paste bin and file-sharing app in Rust with animal-name URLs, burn-after-read, and one-command Docker deployment.

View details
53
Repo Health
67
Technical
71
Dependency
Built with
Rust 43%
HTML 28%
JavaScript 20%
Updated 1 months ago
Rust
71%
MIT

monty

AI Development · Developer Tools

8,763

Run LLM-generated Python code safely inside your agent—no containers, no CPython, no compromise—with sub-microsecond startup.

View details
88
Repo Health
83
Technical
73
Dependency
Built with
Rust 71%
Python 24%
Updated 6 days ago
TypeScript
89%
GPL 3.0

NoteGen

AI Assistants · Knowledge Management · Note Taking

12,914

Capture anything first, then let AI transform your scattered records into polished, structured Markdown notes with RAG-powered knowledge retrieval.

View details
87
Repo Health
74
Technical
67
Dependency
Built with
TypeScript 89%
Updated 6 days ago
TypeScript
90%
MIT

open-pencil

AI Design Tools · Design Tools

9,227

An open-source design editor that reads native Figma files, ships a built-in AI assistant with 100+ design tools, and offers real-time serverless collaboration — all without giving up your files.

View details
84
Repo Health
78
Technical
69
Dependency
Built with
TypeScript 90%
Updated 6 days ago
Rust
59%
GPL 3.0

openfootmanager

Game Development

1,161

A free and open source football management simulation game built with Rust and Tauri, inspired by Football Manager.

View details
94
Repo Health
79
Technical
73
Dependency
Built with
Rust 59%
TypeScript 40%
Updated 1 weeks ago
Rust
91%
MIT

OpenPencil

AI Design Tools

6,464

An open-source, AI-native vector design tool with concurrent agent teams, design-as-code, a built-in MCP server, and multi-model intelligence — a distinct project from the similarly-named Figma-file-reading "open-pencil" editor.

View details
81
Repo Health
70
Technical
75
Dependency
Built with
Rust 91%
Updated 6 days ago
Python
73%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

40,705

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 73%
TypeScript 12%
Rust 11%
Updated 5 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

40,397

The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers