Skip to main content

Compress hard, encrypt harder — LZMA2 + AES-256-GCM + Scrypt

Project description

ChromaPress

Compress hard, encrypt harder.

A high-performance file compression and encryption tool combining LZMA2 extreme compression, SHA-256 chunk deduplication, and AES-256-GCM authenticated encryption with a memory-hard Scrypt KDF.

Installation

pip install chromapress

Quick Start

# Compress + encrypt a file
press myfile.dat

# Decompress
press myfile.dat.press

# Compress without encryption
press myfile.dat --no-encrypt

# Interactive mode
press

# File info (no password needed)
press info myfile.dat.press

Features

  • LZMA2 Extreme — Preset 9 extreme, the strongest lossless compression available
  • AES-256-GCM — Authenticated encryption with tamper detection
  • Scrypt KDF — Memory-hard key derivation (up to 1 GB RAM per brute-force attempt)
  • SHA-256 Deduplication — Chunk-level dedup eliminates identical blocks before compression
  • Interactive Mode — Arrow-key guided menu when run with no arguments
  • Windows Integration — Explorer right-click context menu support

Compression Pipeline

INPUT → CHUNK (64KB) → DEDUP (SHA-256) → LZMA2 (preset 9) → AES-256-GCM → .press

CLI Options

Flag Description
<file> Compress (or auto-decompress if .press)
-d <file> Force decompress mode
-o <path> Output path
-s <level> Security: standard, high, extreme
-c <bytes> Chunk size (default: 65536)
--no-encrypt Compress only, no encryption
-f Force overwrite
-q Quiet mode
-v Show version
info <file> Inspect .press file metadata

Security Levels

Level Scrypt N RAM per attempt
Standard 2^14 16 MB
High 2^17 128 MB
Extreme 2^20 1 GB

Benchmarks

50 MB test files, Python 3.10, Windows 11. No encryption (compression only).

File Type gzip -9 bzip2 -9 lzma -9e ChromaPress
Server Logs 18.0x 36.7x 1434.7x 1414.6x
CSV Data 9.5x 13.4x 31.2x 23.8x
JSON Data 10.2x 21.4x 60.9x 60.5x
Binary/DB 11.9x 10.5x 15.5x 16.3x
Random 1.0x 1.0x 1.0x 1.0x

ChromaPress wins on binary/structured data thanks to SHA-256 dedup + LZMA2 extreme. On text, it matches lzma-9e. On random data, all tools hit the information theory limit.

Full benchmark: see BENCHMARK.md | Run: python benchmark.py

Requirements

  • Python 3.10+
  • cryptography >= 41.0

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chromapress-1.0.1.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromapress-1.0.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file chromapress-1.0.1.tar.gz.

File metadata

  • Download URL: chromapress-1.0.1.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for chromapress-1.0.1.tar.gz
Algorithm Hash digest
SHA256 04f086e06cf854ec1780cb2d92005453ec926bfdf149b0f284f44a2acd738355
MD5 7bfe1ef73de4bc160b47a0b5549eacb9
BLAKE2b-256 3e2b7c85b2bcd01c8a5ba6af5cde69d820a83918c9578ef193a2c31131e182d1

See more details on using hashes here.

File details

Details for the file chromapress-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: chromapress-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for chromapress-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20114b76cd06da9ef754489bd3b9d688683b818a535935169bc6399119702d42
MD5 c1fdf080fd46ba6f3ca815fc929a5bf1
BLAKE2b-256 500612486397a18acd8cdd20d0dba0db54f5a2b45854d0ab33980b7838feff4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page