ZippyPack is an advanced Rust compression tool that leverages Zstandard algorithm with block-level deduplication and system image format for superior compression ratios.
- Zstd Compression: Modern Zstandard algorithm for optimal speed/ratio balance
- Block Deduplication: Store identical data blocks only once (64KB chunks)
- System Image Format: Complete folder snapshots with instant access
- Context-Aware Compression: File-type specific optimizations
- Real-time Progress: Detailed progress with speed and ETA
- Cross-platform: Compatible with Linux, macOS, and Windows
On a dataset of 505 source code files:
- Compression Ratio: 95.67% (5.1 MB β 222 KB)
- Comparison: 6% gap with WinRAR, 12% better than 7-Zip
- Speed: ~0.2 MB/s with maximum compression
zippypack/
βββ src/ # Main source code
β βββ main.rs # CLI interface
β βββ lib.rs # Public library
β βββ compress.rs # Traditional compression
β βββ decompress.rs # Decompression
β βββ image.rs # Image system with deduplication
β βββ profile.rs # Compression profiles
β βββ error.rs # Error handling
βββ examples/ # Usage examples
βββ tools/ # Development utilities
βββ docs/ # Technical documentation
βββ README.md # This file
git clone https://github.com/kamionn/zippypack.git
cd zippypack
cargo build --release
# Compress a folder
cargo run --release -- compress --input folder/ --output archive.zpp --level 22
# Decompress an archive
cargo run --release -- decompress --input archive.zpp --output restored_folder/
# Create system image with deduplication
cargo run --release -- create-image --input project/ --output backup.zpak --level 22
# Extract system image
cargo run --release -- extract-image --input backup.zpak --output restored_project/
# Compression with custom threads
cargo run --release -- compress --input src/ --output code.zpp --threads 8 --level 15
# Solid mode for better compression
cargo run --release -- compress --input data/ --output data.zpp --solid --level 22
compress.rs
: Traditional compression with type detectiondecompress.rs
: Decompression with integrity validationimage.rs
: Image system with block-level deduplicationprofile.rs
: File-type compression profileserror.rs
: Typed error handling
- Header: Version, metadata, statistics
- Block Index: Hash and position of each unique block
- Compressed Data: Deduplicated zstd blocks
- File Metadata: Directory tree and block references
# Unit tests (in modules)
cargo test
# Verbose tests
cargo test -- --nocapture
# Usage example
cargo run --bin basic_usage
Feature | ZippyPack | WinRAR | 7-Zip |
---|---|---|---|
Deduplication | β | β | β |
Instant Access | β | β | β |
Real-time Progress | β | β | β |
Modern Format | β | β | β |
Cross-platform | β | β | β |
- Development Projects: node_modules, target/, build/
- Incremental Backups: Massive deduplication benefits
- Game Assets: Similar textures and models
- Documentation Archives: Files with repetitive patterns
- Incremental compression
- FUSE mounting for direct access
- Graphical interface
- CI/CD integration
- Optimized cloud synchronization
Contributions are welcome! Check out the issues for ongoing tasks.
This project is licensed under the MIT License. See the LICENSE file for details.
# Generate test files
rustc tools/generate_test_files.rs && ./generate_test_files
# Test compression
cargo run --release -- create-image --input test_files --output benchmark.zpak --level 22
# Compare with other tools
# WinRAR: 268 KB
# 7-Zip: 324 KB
# ZippyPack: 284 KB
ZippyPack: Because every byte counts. π