Skip to content

About

Smart lossless archiver (.kram, .zip, .rar, .arj) that understands your files to shrink them up to 60-70% smaller than 7-Zip with zero quality loss.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

KRAM v1.0.6 (.kram / .krm) - Semantic Multi-Format Archiver + CUDA Neural Engine

KRAM Archiver GUI showing compressed files with ratio bars, Archive Inspector, and live file preview

In Plain English: Why KRAM Is Better Than Other Archivers

If you have ever zipped up a folder of Word documents, PDFs, photos, or project backups using Windows ZIP, 7-Zip, or WinRAR, you have probably noticed that the archive barely gets smaller. That happens because traditional archivers pack files blindly: they only look at raw data without knowing whether a file is a photo, a spreadsheet, a Word document, or an older copy of another file.

KRAM is built differently:

  • It understands what is inside your files. Before shrinking a folder, KRAM recognizes common file types (Word/Excel documents, PDFs, JPG/PNG photos, WAV audio, CSV spreadsheets, logs, and programs) and gently unpacks or reorganizes their internal structure so standard compression can squeeze them much tighter.
  • It spots duplicates across your entire archive. If you back up multiple versions of a project or folders that share similar files, KRAM automatically detects repeated pieces anywhere in the archive and stores them only once.
  • Dramatically smaller files, with zero quality loss. KRAM routinely produces archives up to 60% smaller than 7-Zip Ultra on Office documents and PDFs, 53% smaller on spreadsheets and logs, 27% smaller on photos and audio, and nearly 70% smaller on text and source code when using its optional NVIDIA GPU AI mode. Despite the huge size savings, every single file comes back 100% identical down to the last bit, verified automatically with cryptographic checksums.
  • One clean app for every archive format, with no annoyances. KRAM opens, creates, verifies, and converts .kram, .zip, .rar, and .arj files in one place. It integrates right into the Windows 11 top-level right-click menu without asking for Administrator privileges, respects Light and Dark mode across every window and popup, updates itself automatically, and never shows trial popups or nag screens.

Technical Overview: How KRAM Works

KRAM is a 100% bit-for-bit lossless archiver with zero external runtime dependencies (no Python, no PyTorch, no Electron, no .NET, and no external CLI wrappers). It combines reversible domain-specific semantic transforms, FastCDC/BLAKE3 cross-file deduplication, adaptive Zstd/LZMA2/rANS, and an optional direct CUDA LLM neural engine, alongside native support for .zip, .rar (RAR5/RAR4), and .arj.

Most archivers (ZIP, 7-Zip, WinRAR, tar.xz, tar.zst) treat files as opaque streams of raw bytes. When you archive modern workloads such as Office files (.docx/.xlsx), .pdf, .gz, .jpg, .png, .wav, JSON/CSV/logs, or versioned project folders, traditional archivers hit a hard ceiling because they cannot look inside structured or already-compressed formats.

KRAM takes a fundamentally different approach:

1. Reversible Semantic Domain Transforms (100% Bit-Exact)

Before entropy coding, KRAM automatically detects each file's structure and applies bijective, self-verifying transforms that expose massive hidden redundancy traditional compressors miss:

  • Nested Deflate Unwrapping (.docx, .xlsx, .pdf, .gz, .zip): Extracts exact Deflate recipes and recursively transforms inner XML/text/media, shrinking Office/PDF/GZ bundles 60.5% smaller than LZMA2-9 (7-Zip Ultra).
  • Lossless Media Re-Coding (.jpg, .png, .bmp, .wav): Baseline JPEG DCT-domain rANS re-coding, PNG/BMP Sub-Green + LOCO-I MED pixel residuals, and WAV Mid-Side + Levinson-Durbin Order-10 LPC, shrinking media archives 27.0% smaller than LZMA2-9, bit-for-bit identical on restore.
  • Structured Data Shredding (.csv, .ndjson, .log, .xml/.html/.svg): Columnar shredding with key-grouped deltas, cross-column diffs, ISO-UTC timestamp deltas, IPv4 byte planes, XML template splitting, and bit-level rANS, shrinking structured data 53.5% smaller than LZMA2-9 (with 411 MB/s decompression).
  • Executable & Binary Normalization (.exe, .dll, Float32/64): PE32/PE64 section splitting with bijective x86-64 branch/IAT/RIP normalization and adaptive float byte-plane predictors, achieving 12.8%-14.2% smaller archives than LZMA2-9.

2. Global FastCDC/BLAKE3 Deduplication + Semantic Bucketing

Instead of relying solely on a fixed-size sliding dictionary window that loses track of duplicate blocks across directories:

  • KRAM chunks data with Gear-hash FastCDC and deduplicates globally with BLAKE3.
  • Applies depth-1 line-level cross-file delta coding across related/versioned files.
  • Routes transformed streams into semantic buckets (grouping code with code, numeric columns with numeric columns, pixel residuals with pixel residuals) and picks the optimal backend per bucket (Zstd, LZMA2, Order-0/Order-1 rANS, or Neural GPU).
  • Result: 67.7% smaller than LZMA2-9 on versioned backups.

3. Direct CUDA Neural Compression (Zero Python / Zero PyTorch)

For maximum compression on text and source code, KRAM embeds a native CUDA + NVRTC + cuBLASLt neural engine (Qwen2.5-0.5B / 1.5B / 3B, FP8 E4M3 & BF16 Tensor Cores, CUDA Graphs, and on-GPU 64-bit rANS) that achieves up to 66.7%-71.9% smaller archives than LZMA2-9 with no Python or PyTorch runtime required.

4. Modern Native Windows 11 Experience & Built-In Auto-Updates

  • True Windows 11 Top-Level Right-Click Menu (native COM IExplorerCommand + Sparse Package): appears directly at the top level (above "Show more options") with dynamic filenames (Add to "<name>.kram", Extract to "<name>\", Shrink to "<name>.kram"), plus classic HKCU fallback, requiring zero Admin/UAC elevation.
  • Modern Native Win32 UI: System / Light / Dark theming on every window, dialog, and popup, inline color-coded compression ratio bars, Live Savings Inspector, and instant zero-extract Text/Hex Quick Preview.
  • User-Friendly Settings: Choose default .kram (default) or .krm extension, toggle Auto-Update (on by default, detects & installs new GitHub Releases automatically), and install or cleanly remove Windows Explorer context menus (with an option to keep .kram/.krm file associations).

5. All-in-One Multi-Format Interoperability

Native read, write, verify, inspect, and cross-format conversion across KRAM (.kram/.krm), ZIP/ZIP64 (.zip), RAR5/RAR4 (.rar), and ARJ (.arj), including one-click "Shrink to .kram" to recompress legacy .zip/.rar/.arj files.


Comparison vs. Existing Archivers

Capability KRAM v1.0.6 7-Zip (.7z) WinRAR (.rar) Windows / OS .zip
Bit-Exact Lossless Compression Yes (100% BLAKE3 verified) Yes (CRC32) Yes (BLAKE2sp / CRC32) Yes (CRC32)
Office / PDF / GZ Unwrapping Yes (-60.5% vs LZMA2-9) No No No
Lossless JPEG / PNG / WAV Transforms Yes (-27.0% vs LZMA2-9) No Limited (audio/RGB delta) No
CSV / NDJSON / Log Columnar Coding Yes (-53.5% vs LZMA2-9) No No No
Global FastCDC/BLAKE3 Deduplication Yes No No No
Optional CUDA LLM Neural Mode Yes (Native CUDA, zero Python) No No No
Multi-Format Write .kram/.krm, .zip, .rar (RAR5), .arj .7z, .zip, .tar, etc. (no RAR write) .rar, .zip .zip only
Windows 11 Top-Level Context Menu Yes (Zero-UAC Sparse Pkg) Classic menu / extra step Yes Built-in ZIP only
Dark / Light / System Theme Full native theme on all windows & popups Legacy Win32 look Partial / skins System
Built-In GitHub Auto-Update Yes (On/Off in Settings) Manual download Manual download OS Update
License / Nag Screens Open, zero nag screens Open (LGPL) Proprietary trial nag OS built-in

Verified Benchmark Results (556 Files / 54.15 MB Corpus, 100% BLAKE3 Bit-Exact)

Workload Raw LZMA2-9 (7-Zip Ultra) KRAM Best vs LZMA2-9 Mode
01_office_nested (20 DOCX/XLSX/GZ/PDF) 1.21 MB 1,217,988 B 480,886 B (486,481 B CPU) -60.5% Neural / Max
02_media_assets (14 JPG/PNG/WAV/BMP) 10.58 MB 7,791,548 B 5,684,501 B -27.0% Max (158 MB/s dec)
03_structured_data (4 NDJSON/CSV/LOG/XML) 16.19 MB 1,848,344 B 859,858 B -53.5% Balanced (74 MB/s / 411 MB/s dec)
04_text_and_code (340 Python/Rust/Prose) 7.89 MB 1,326,116 B 441,349 B -66.7% Neural 3B BF16 ctx=1024
05_versioned_backups (175 files) 4.79 MB 209,456 B 67,691 B -67.7% Neural 3B BF16 ctx=1024
06_numeric_binaries (F32/F64/DLL) 13.49 MB 6,754,132 B 5,888,518 B -12.8% Max (153 MB/s dec)
python313.dll (x86-64 PE64) 5.86 MB 1,957,768 B 1,679,071 B -14.2% Max (100 MB/s dec)
market_ticks.csv 4.55 MB 616,628 B 195,447 B -68.3% Max (49 MB/s / 195 MB/s dec)
english_technical_prose.txt 1.03 MB 262,448 B 86,417 B -67.1% Neural 3B BF16 ctx=1024
argparse.py 0.10 MB 19,856 B 5,581 B -71.9% Neural 3B BF16 ctx=1024
ALL_CORPUS (556 files) 54.15 MB 18.95 MB 13.35 MB (14.27 MB CPU) -29.6% (-24.7% CPU) 3B Neural / Max (468 MB/s dec)

Installation

Windows (x64 Installer)

Download and run dist/KRAM-Setup-1.0.6-x64.exe (or from GitHub Releases):

  • Installs kramgui.exe, kram.exe, and KramShellExt.dll (Windows 11 top-level shell extension) per-user with no Admin/UAC prompt required.
  • Optionally registers Windows Explorer right-click menus, .kram/.krm file associations, and adds kram.exe to PATH.
  • Cleanly unregisters all Explorer menus and PATH entries on uninstall.

Debian / Ubuntu Linux (.deb Package)

Download and install dist/kram_1.0.6_amd64.deb (or from GitHub Releases):

sudo apt install ./kram_1.0.6_amd64.deb
kram --version

Supported Archive Formats

Format Extension Pack (Write) Unpack / Verify / Info Details
KRAM .kram / .krm Yes Yes Semantic transforms + FastCDC/BLAKE3 dedup + Zstd/LZMA2/rANS/CUDA LLM
ZIP .zip Yes Yes Parallel Deflate (L1/L6/L9) + Store, ZIP64, Data Descriptors, CRC32
RAR .rar Yes (RAR5) Yes (RAR5 & RAR4) RAR5 LZSS+Huffman (LRU old_dist[4], solid, Delta/E8/E8E9/ARM filters) + RAR4 (v29)
ARJ .arj Yes Yes Method 0 (Store), Methods 1-3 (26 KB LZSS + Block Huffman), Method 4 (Fastest LZSS)

Desktop GUI & Settings

kramgui.exe                                   # Open KRAM Explorer GUI
kramgui.exe archive.kram                      # Open straight inside an archive (.kram/.krm/.zip/.rar/.arj)
kramgui.exe --register-shell                  # Install Windows Explorer context menus (HKCU, no admin)
kramgui.exe --unregister-shell [--keep-assoc] # Remove Windows Explorer context menus (optionally keep .kram/.krm association)
kramgui.exe --check-update [--install]        # Check GitHub Releases for a newer version

Open Settings from the toolbar or Tools -> Settings... (Ctrl+,) to configure:

  • Window Theme: System (Auto), Light Mode, or Dark Mode (applied to all windows, dialogs, and popups)
  • Default KRAM Archive Extension: .kram (default) or .krm
  • Automatic Updates: On (default: detects and silently installs new GitHub releases) or Off, plus manual Check for Updates
  • Windows Explorer Context Menus: Install/reinstall or remove Windows 11 top-level & classic context menus, with live component status and an option to keep .kram/.krm file associations

CLI Usage

kram pack <input> <output.kram|.krm|.zip|.rar|.arj> [--format kram|krm|zip|rar|arj] [--mode fast|balanced|max|neural] [--model Qwen/Qwen2.5-0.5B|1.5B|3B] [--fp8|--bf16] [--ctx 512|1024]
kram unpack <archive> <output_dir>
kram verify <archive>
kram info <archive>
kram convert <in_archive> <out_archive> [--format kram|krm|zip|rar|arj] [--mode fast|balanced|max|neural]
kram bench [corpus_dir] [--modes fast,balanced,max,neural] [--model ...] [--fp8|--bf16] [--ctx 512|1024]
kram --version

Building from Source

Windows (MSVC x64 + Inno Setup 6)

vendor\build_vendor.bat
build.bat
packaging\windows\build_installer.bat

Produces kram.exe, kramgui.exe, KramShellExt.dll, and dist\KRAM-Setup-1.0.6-x64.exe. (For optional GPU --mode neural, place CUDA 12 runtime DLLs in cuda_rt/ locally.)

Debian / Ubuntu Linux (.deb)

sudo apt-get install build-essential zlib1g-dev libzstd-dev liblzma-dev dpkg-dev
make
make test
bash packaging/deb/build_deb.sh

Produces kram and dist/kram_1.0.6_amd64.deb.


Architecture

  • Core (csrc/): util.c, format.c, dedup.c (Gear-hash FastCDC + BLAKE3), detector.c, backend.c (zstd, liblzma, 4-way interleaved Order-0/Order-1 rANS, GPU neural dispatch), archive.c, bench.c, main.c, rans.c
  • Multi-Format Archive Engines (csrc/formats/): fmt_common.c, fmt_zip.c, fmt_rar.c, fmt_arj.c
  • Reversible Domain Transforms (csrc/transforms/): tx_deflate.c, tx_jpeg.c, tx_png_bmp.c, tx_wav_float.c, tx_tabular.c, tx_xml.c, tx_pe_x64.c, tx_delta.c
  • Direct CUDA Neural Engine (csrc/neural/): bpe.c, safetensors.c, cuda_neural.c
  • Windows Desktop GUI, Auto-Updater & Explorer Integration (csrc/gui/): gui_main.c, gui_dialogs.c, gui_theme.c, gui_icons.c, gui_shell.c, gui_updater.c, shell_ext.c, shell_pkg/AppxManifest.xml
  • Packaging (packaging/, debian/, Makefile): Inno Setup 6 Windows x64 installer (packaging/windows/kram.iss), native Debian .deb builder (packaging/deb/build_deb.sh, debian/), and GitHub Actions CI/Release pipeline (.github/workflows/build-packages.yml)

About

Smart lossless archiver (.kram, .zip, .rar, .arj) that understands your files to shrink them up to 60-70% smaller than 7-Zip with zero quality loss.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages