Lightning-fast compression with the power of Zstandard
Transform your files with blazing-fast compression ratios up to 15:1
KZip is a next-generation command-line compression tool that combines the cutting-edge Zstandard algorithm with asynchronous I/O to deliver unparalleled performance. Whether you're archiving terabytes of data or compressing a single document, KZip adapts to your needs with intelligent compression modes and professional-grade features.
| Feature | Benefit |
|---|---|
| 🔥 Multi-Mode Compression | Choose between speed, balance, or maximum compression |
| 📁 Smart Directory Handling | Seamlessly compress entire folder structures |
| ⚡ Async I/O Engine | Up to 200 MB/s processing speeds |
| 🎨 Beautiful Progress Tracking | Real-time visual feedback with ETA |
| 🔄 STDIN/STDOUT Support | Perfect for pipeline integration |
| 🛡️ Graceful Interruption | Safe Ctrl+C handling with cleanup |
| Mode | Speed | Ratio | Use Case |
|---|---|---|---|
-ms |
⚡⚡⚡ | 5:1 | Real-time processing |
| Default | ⚡⚡ | 8:1 | General purpose |
-mc |
⚡ | 15:1 | Long-term archival |
- Compression Speed: 50-200 MB/s
- Decompression Speed: 2-3x faster than compression
- Memory Efficient: 512MB maximum usage
- Multi-threaded: Auto-detects optimal thread count
📝 Text Files ████████████████ 15:1
🖼️ Images (JPEG) ██ 2:1
📄 Documents (PDF) ████████ 8:1
💻 Source Code ████████████ 12:1
# 1. Download KZip
git clone https://github.com/Karthikdude/kzip.git
# 2. Install dependencies
pip install zstandard aiofiles rich
# 3. Make executable (Unix systems)
chmod +x kzip.py🐧 Linux (Ubuntu/Debian)
# Install Python 3.11+
sudo apt update && sudo apt install python3.11 python3-pip
# Install dependencies
pip3 install zstandard aiofiles rich
# Global installation
sudo cp kzip.py /usr/local/bin/kzip
sudo chmod +x /usr/local/bin/kzip🍎 macOS
# Install Python (using Homebrew)
brew install python@3.11
# Install dependencies
pip3 install zstandard aiofiles rich
# Global installation
sudo cp kzip.py /usr/local/bin/kzip
sudo chmod +x /usr/local/bin/kzip🪟 Windows
# Install Python from python.org
# Then install dependencies
pip install zstandard aiofiles rich
# Create batch file for global access
echo @python "C:\path\to\kzip.py" %* > C:\Windows\System32\kzip.bat🏗️ Arch Linux
# Install Python and pip
sudo pacman -S python python-pip
# Install dependencies
pip install zstandard aiofiles rich
# Global installation
sudo cp kzip.py /usr/local/bin/kzip
sudo chmod +x /usr/local/bin/kzipkzip [options] [file_or_directory]| Option | Description | Example |
|---|---|---|
-mc, --max-compression |
Maximum compression ratio | kzip -mc archive.tar |
-ms, --max-speed |
Maximum processing speed | kzip -ms documents/ |
-d, --decompress |
Decompress .zst files | kzip -d file.zst |
-r, --remove |
Auto-remove after decompression | kzip -d -r backup.zst |
-v, --verbose |
Detailed progress output | kzip -v -mc photos/ |
| Use Case | Command | Output |
|---|---|---|
| Single File | kzip document.pdf |
document.pdf.zst |
| Maximum Compression | kzip -mc photos/ |
photos.zst |
| Speed Mode + Progress | kzip -ms -v backup.tar |
backup.tar.zst with progress |
| STDIN Pipeline | cat data.txt | kzip -mc |
stdin_output_YYYYMMDD_HHMMSS.zst |
| Scenario | Command | Result |
|---|---|---|
| Basic Decompression | kzip -d archive.zst |
Restores original with cleanup prompt |
| Auto-cleanup | kzip -d -r backup.zst |
Restores and removes .zst file |
| Verbose Decompression | kzip -d -v -r project.zst |
Detailed progress + auto-cleanup |
KZip v1.0.0 - High-Performance Compression Tool
========================================
Operation: Compression
Input: /home/user/documents
Output: documents.zst
Compression Level: 22 (maximum compression)
Worker Threads: 8
Max Memory: 512MB
Files processed: 1,247/1,247 | Speed: 45.2 MB/s
Progress: ████████████████████████████████ 100%
Compression Summary:
- Original size: 2,847.3 MB
- Compressed size: 284.1 MB
- Compression ratio: 10.0:1
- Total time: 1m 23s
- Average speed: 34.4 MB/s
- Files processed: 1,247
- Errors: 0
Compressing: ████████████████████ 87% | 2.1 GB/2.4 GB | 67.3 MB/s | ETA: 0:00:04
graph TD
A[KZip CLI] --> B[Compression Engine]
B --> C[Zstandard Compressor]
B --> D[Async I/O Handler]
D --> E[Progress Tracker]
E --> F[Rich UI Console]
G[File Input] --> B
H[Directory Input] --> I[TAR Archive Builder]
I --> B
J[STDIN Input] --> B
| Component | Requirement |
|---|---|
| Python | 3.11+ |
| Memory | 512MB available RAM |
| Storage | Temp space = largest file size |
| CPU | Multi-core recommended |
| Package | Purpose | Version |
|---|---|---|
zstandard |
High-performance compression | >=0.23.0 |
aiofiles |
Asynchronous file operations | >=24.1.0 |
rich |
Beautiful terminal UI | >=14.1.0 |
| Level | Speed | Ratio | Memory | Use Case |
|---|---|---|---|---|
| 1 | Fastest | Good | Low | Real-time |
| 9 | Balanced | Better | Medium | General |
| 22 | Slowest | Best | High | Archival |
# Internal Configuration
CHUNK_SIZE = 65536 # 64KB chunks
MAX_MEMORY_MB = 512 # Memory limit
MAX_WORKERS = 8 # Thread limit❌ "Required dependency missing"
Solution:
pip install zstandard aiofiles rich🔒 Permission denied (Linux/macOS)
Solution:
sudo cp kzip.py /usr/local/bin/kzip
sudo chmod +x /usr/local/bin/kzip🐍 Python not found
Solutions:
- Ensure Python 3.11+ is installed
- Use
python3instead ofpython - Add Python to your system PATH
💾 Out of memory errors
Solutions:
- Use
--max-speedmode:kzip -ms large_file.tar - Ensure sufficient disk space
- Close other memory-intensive applications
# Verify installation
python -c "import zstandard, aiofiles, rich; print('✅ All dependencies OK')"
# Test basic functionality
kzip --help
# Verbose mode for detailed output
kzip -v file.txtKZip welcomes contributions! Here's how to get started:
- 🐍 Python 3.11+ Compatibility: Ensure code works across versions
- 🎨 Code Style: Follow existing patterns and PEP 8
- 🧪 Testing: Test with various file types and sizes
- 🌍 Cross-platform: Maintain Windows, macOS, and Linux support
# Fork and clone the repository
git clone https://github.com/Karthikdude/kzip.git
cd kzip
# Install development dependencies
pip install zstandard aiofiles rich
# Make your changes
# Test thoroughly
python kzip.py --help
# Submit a pull requestThis project is open source. Please review license terms before commercial use.
| Version | Release Date | Highlights |
|---|---|---|
| v1.2.0 | 2025 | 🚀 Major enhancements |
| ⚙️ TOML/INI configuration support | ||
| 🔄 Parallel processing with dynamic resource management | ||
| 🔍 Smart archive detection | ||
| ✅ Pydantic validation for settings | ||
| 🔒 SHA256 integrity verification | ||
| ⏱️ Enhanced progress tracking with real-time stats | ||
| 🛠️ Configuration file support (kzip.toml, ~/.kziprc) | ||
| 📊 Improved summary output with compression insights | ||
| v1.1.0 | 2025 | Performance & Reliability |
| ⚡ Parallel file processing | ||
| 🔄 Resume capability with checkpoints | ||
| 📊 Resource monitoring and throttling | ||
| 🎯 Improved archive detection | ||
| 🛡️ Better error handling | ||
| v1.0.0 | 2025 | Initial Release |
| ✨ Zstandard compression with multiple modes | ||
| ⚡ Asynchronous I/O for high performance | ||
| 🎨 Professional terminal UI with progress tracking | ||
| 🌍 Cross-platform compatibility |
🐛 Report Bug | ✨ Request Feature | 📖 Documentation
Made with ❤️ by Karthik S Sathyan
Compress smarter, not harder