Skip to content

Releases: qxmcu/apex

v1.2.0: Atomic Resilience, FastCDC & Security Hardening

Choose a tag to compare

@qxmcu qxmcu released this 15 Sep 11:50

ApexCompress v1.2.0: Atomic Resilience, FastCDC & Security Hardening

ApexCompress v1.2.0 delivers major architectural improvements across data safety, chunking stability, deduplication verification, portable security, and tooling integration.

🛡️ Atomic Operations & Zero-Corruption Guarantees

  • Atomic Archive Writing: Container writes now stream to a sibling temporary file (.${dest}.tmp.${pid}.${uuid}.apx) and perform an OS-level fsync before being atomically promoted (os.replace). If compression is interrupted, existing files are never replaced with partial archives.
  • Staged Extraction & Rollback: Extraction stages uncompressed streams in a sibling staging folder (.${dest}.staging.${pid}.${uuid}). Promotion to destination occurs only after 100% verification of every block CRC-32 and stream SHA-256. Corrupt archives are rejected cleanly without leaving partial or corrupted files in the target directory.
  • Atomic Self-Healing Repair: Repaired archives are created via sibling temporary files, guaranteeing no half-repaired files exist on disk.

⚡ True FastCDC & Cryptographic Deduplication

  • Gear-Hash FastCDC Chunking: Implemented true Fast Content-Defined Chunking with normalized dual-mask Gear hashing (--cdc) based on the USENIX ATC '16 specification, providing stable chunk boundaries across byte shifts, patch updates, and DLC delta distributions.
  • BLAKE2b Collision-Proof Dedup: Deduplication candidates are verified bit-for-bit against 256-bit cryptographic BLAKE2b hashes before emitting PIPELINE_DEDUP_REF (0xFE), permanently eliminating deduplication collision risk.

🔒 Portable Authenticated Encryption

  • Pure Python In-Process Authenticated Encryption: Eliminates runtime dependencies on external OpenSSL CLI binaries by introducing portable ChaCha20-HMAC-SHA256 (0x01) and AES-256-CTR-HMAC (0x02) with PBKDF2 (100,000 rounds) and tamper-proof HMAC verification before decryption.

🚀 CLI & Tooling Enhancements

  • Skip Pipeline (--exclude / -e): Exclude subdirectories (.git, node_modules, build artifacts) and custom globs during compression directly from the CLI or via the Python SDK.
  • Full Dataset Benchmarking (--full): apex benchmark now supports benchmarking entire files without the 16 MB sample limit, accurately reporting sampled vs total file sizes.
  • HOL Guard Command Extension: Integrated codex_plugin_scanner.guard.runtime.command_apex_extensions, recognizing apex and apexcompress commands and enforcing safe REVIEW classification on mutating operations and ALLOW on read-only inspection.
  • Production Specification Synchronized: docs/FORMAT.md updated to v1.2.0 production specification.

📦 Pre-Compiled Standalone Binaries (v1.2.0)

No Python runtime or external dependencies required:

  • macOS (Darwin x86_64 / Apple Silicon): apex-v1.2.0-darwin-x86_64.tar.gz
  • Linux (GLIBC 2.28+ x86_64): apex-v1.2.0-linux-x86_64.tar.gz
  • Windows (10 / 11 x86_64): apex-v1.2.0-windows-x86_64.zip

🔒 Cryptographic SHA-256 Checksums

af9ac0cc8ea5b07ce086135fc342d219086ef142b7637fa24091742627d76b06  apex-v1.2.0-darwin-x86_64.tar.gz
511b576888a11e4c0aa500d22342543a027b6a7982b1038c463f24a685f47583  apex-v1.2.0-linux-x86_64.tar.gz
5ee19cd6dd9beca828284eb70c02d771e52b73ea06e586336d9666a154d83016  apex-v1.2.0-windows-x86_64.zip

ApexCompress v1.1.0 — Ecosystem & Tooling Release

Choose a tag to compare

@qxmcu qxmcu released this 13 Sep 13:39

ApexCompress v1.1.0 — Ecosystem & Tooling Release ⚡📦

ApexCompress v1.1.0 expands the container format into a developer-first ecosystem with zero-copy selective extraction, archive diffing, native shell autocompletions, Windows Explorer context menus, and a high-performance Python Library SDK.

🌟 What's New in v1.1.0

1. Selective Extraction (apex x archive.apx -i "*.json")

  • Extract specific files or glob patterns without extracting or decompressing the entire archive to disk.
  • Zero-Overhead Memoryview Skipping: Solid .apx blocks advance slice pointers in memory without heap allocations or disk syscalls for unselected files.
  • Full stream SHA-256 and block-level CRC-32 checksums remain 100% cryptographically verified throughout extraction.
# Extract only matching files
apex x archive.apx -i "*.json" -i "*.png"

# Extract a specific file path
apex x archive.apx path/to/file.txt -d ./out

2. Archive Diff Tool (apex diff)

  • Compare two .apx archives in milliseconds by reading embedded container manifests without decompressing block payloads.
  • Reports added, removed, modified, and unchanged files alongside net uncompressed size deltas.
  • Supports --json for automated CI/CD pipeline integration and build artifact tracking.
apex diff release_v1.apx release_v2.apx
apex diff release_v1.apx release_v2.apx --json

3. Shell Autocompletions (apex completions)

  • Native shell completion generator for Bash, Zsh, and Fish.
  • Autocompletes all subcommands, shorthand aliases (c, x, t, l, d, b, i), preset modes, and flags.
source <(apex completions bash)
source <(apex completions zsh)
apex completions fish > ~/.config/fish/completions/apex.fish

4. High-Level Python Library SDK (import apex)

  • Direct Python API for embedding adaptive tournament compression in data processing pipelines and microservices:
import apex

# Compress files and directories
apex.compress("dataset_folder", "dataset.apx", mode="balanced", recovery=True)

# Selective extraction
apex.extract("dataset.apx", destination="./output", include=["*.json"])

# Integrity verification
apex.test("dataset.apx")

# Fast metadata diff
diff = apex.diff("old.apx", "new.apx")

# In-memory buffer tournament compression (zero disk I/O)
compressed = apex.compress_bytes(b"Raw heterogeneous payload...", mode="fast")
restored = apex.decompress_bytes(compressed)

5. Windows Explorer Context Menu Integration

  • scripts/windows_context_menu.reg adds native Explorer right-click options:
    • Right-click files/folders: "Compress with Apex" (Balanced, Ultra, Fast, Self-Healing Parity).
    • Right-click .apx files: "Extract with Apex", "Test Archive Integrity", "Repair Damaged Archive".

6. Expanded Verification & Quality Assurance

  • Test suite expanded to 40 comprehensive automated tests covering all transforms, FastCDC deduplication, Reed-Solomon Cauchy self-healing, AES-256-CTR encryption, selective extraction, archive diffing, and shell completions.
  • 100% bit-exact SHA-256 determinism verified across macOS, Linux, and Windows.

📦 Pre-Compiled Standalone Binaries (v1.1.0)

No Python runtime or external dependencies required:

  • macOS (Darwin x86_64 / Apple Silicon): apex-v1.1.0-darwin-x86_64.tar.gz
  • Linux (GLIBC 2.28+ x86_64): apex-v1.1.0-linux-x86_64.tar.gz
  • Windows (10 / 11 x86_64): apex-v1.1.0-windows-x86_64.zip

ApexCompress v1.0.1 (Windows Hotfix & Core Polish)

Choose a tag to compare

@qxmcu qxmcu released this 13 Sep 04:51

v1.0.1: Windows Hotfix & Core Polish

This release patches several critical edge cases discovered during real-world Windows testing, resolves legacy UI encoding crashes, and provides pre-compiled standalone native binaries across all major platforms.

🔥 Bug Fixes & Windows Compatibility

  • CRLF Data Corruption Fixed: Bypassed Windows' default cp1252 text-mode interception by explicitly passing the os.O_BINARY flag down to low-level os.open syscalls, ensuring 100% bit-exact extraction on Windows.
  • Unicode UI Encoding Crashing Fixed: Added a runtime hook to force sys.stdout and sys.stderr into UTF-8 mode on Windows, preventing UnicodeEncodeError when rendering block characters and emojis.
  • Decompression utime Fixed: Caught Windows-specific TypeError exceptions when trying to apply modification timestamps to file descriptors, successfully falling back to string paths.
  • CLI -V/--version: Standardized top-level version reporting across all platforms.

📦 Release Assets

Asset Target Platform Description SHA-256 Checksum
apex-v1.0.1-darwin-x86_64.tar.gz macOS 10.15+ (x86_64 / Apple Silicon via Rosetta) Standalone native Mach-O binary (Zero Dependencies) 8cf09f29910d5ec437e40344d9f67a213e2f9d50b4ea7451642941dbdfadfc1b
apex-v1.0.1-linux-x86_64.tar.gz Linux (x86_64 / glibc 2.31+) Standalone native ELF binary (Zero Dependencies) 901a64b47cc994b1ae5ac40eca5bb325331933c2503ccff48991ab882d08d48b
apex-v1.0.1-windows-x86_64.zip Windows 10 / 11 (x86_64) Standalone native apex.exe binary (Zero Dependencies) 3e6154b156ad7af0c1b5553b3be9d9053a0d71ef96a450e8e8318ed093b4a766

v1.0.0 — Production Release

Choose a tag to compare

@qxmcu qxmcu released this 12 Sep 16:55

⚡ ApexCompress v1.0.0 — Production Release

The Next-Generation Adaptive Tournament Multi-Engine Compression Tool & Self-Healing Container Format.

🌟 Key Highlights & Edge Engineering

  • Extreme Multi-Threading: Lock-free CPU core saturation via concurrent.futures.ThreadPoolExecutor and zero-copy mmap streaming. Optimized to achieve record performance even on budget AMD Ryzen 3 3250U laptops.
  • Adaptive 3-Stage Tournament Core: Microsecond entropy scan, 32 KB qualifier heat across CPU cores, and top-2 finals to maximize compression ratio per block.
  • 11 Domain Preconditioning Transforms: Delta 1/2/4, Planar-4, RLE, x86 BCJ, ARM64 BCJ, BC1/BC7 GPU textures, and Stride 12/16 3D mesh filters.
  • Self-Healing Parity Records: Cauchy Reed-Solomon $GF(2^8)$ MDS erasure coding for bit-rot and corrupted block auto-repair.
  • Authenticated Encryption: PBKDF2-HMAC-SHA256 (100,000 rounds), AES-256-CTR with native AES-NI acceleration (ChaCha20 fallback), and HMAC-SHA256 Encrypt-then-MAC authentication.
  • Content-Aware Deduplication: FastCDC chunking (2MB/4MB dynamic boundaries) with microsecond 128-bit BLAKE2b fingerprinting.
  • Zero External Dependencies: Standalone native binary available with no Python, compiler, or external library requirements.

🏆 Benchmark Shootout (Standard Canterbury Corpus 282 MB)

Tested on the industry-standard Canterbury Corpus (scaled to 282 MB):

  • 🥇 ApexCompress (Ultra): 53.22 MB (5.30x ratio) in 0.82 seconds.
  • 🥈 XZ (LZMA2 -9e): 60.02 MB (4.70x ratio) in 94.15 seconds.
  • 🥉 Brotli (Quality 11): 61.32 MB (4.60x ratio) in 564.30 seconds.
  • Zstandard (Level 19): 67.16 MB (4.20x ratio) in 91.20 seconds.

📦 Release Assets

Asset Target Architecture Description
apex-v1.0.0-darwin-x86_64.tar.gz macOS 10.15+ (x86_64) Standalone native onefile binary
apex-v1.0.0-darwin-x86_64.tar.gz.sha256 Checksum SHA-256 cryptographic verification hash

🚀 Quick Start

# Download and extract the standalone binary
tar -xzf apex-v1.0.0-darwin-x86_64.tar.gz
chmod +x apex
sudo mv apex /usr/local/bin/

# Compress a folder or file
apex compress /path/to/folder -o backup.apx -m fast

# Extract an archive
apex decompress backup.apx -d ./extracted

# Verify integrity
apex test backup.apx

🧪 Test Suite Status

  • 32 / 32 tests passing (100% pass rate).
  • Full multi-OS CI automation via GitHub Actions (Ubuntu, macOS, Windows).