Repository navigation
Komla is a lossless image compressor and a lossless JPEG recompressor. A .komla file restores
the exact pixels of a PNG or BMP, or the exact original JPEG file, byte for byte; every
.komla file carries a checksum that is verified on restore.
JPEG: two models. Komla strong is the command line's default, and Komla fast (--fast)
is the quicker one (and the web app's default). Results on a held-out set of 66 JPEGs
(317.5 MB), drawn at random and frozen before Komla strong was developed, and run once after
the code was frozen:
Komla fast (--fast) |
Komla strong (default, --strong) |
|
|---|---|---|
| Smaller than the JPEGs | 21.44% | 24.73% |
| Compress / decompress, one thread | 13.37 / 17.18 MB/s | 8.04 / 8.82 MB/s |
| Compress / decompress, eight cores | 43.40 / 68.17 MB/s | 29.45 / 37.60 MB/s |
| Peak memory, one thread (compress / decompress) | 43 / 7 MiB | 55 / 12 MiB |
On the same files paq8px saves 23.00%, Lepton (Rust port) 21.05%, packJPG 20.92%, brunsli
20.29% and JPEG XL 18.26%. paq8px stays ahead on baseline JPEGs (27.79% against 25.40% for
Komla strong) but has no model for progressive ones. A third mode, Komla maximum
(--maximum), is an older model about twenty times slower than Komla strong, measured only on
an earlier test set and the development set (24.11% on the test set, against 23.11% for Komla
strong and 20.20% for Komla fast).
PNG and BMP have a single model. Full results:
https://github.com/paatai/Compress/blob/main/bench/results/JPEG_SPEED_REPORT.md
Run it. Download the archive for your system below, unpack it and run komla from the
unpacked folder:
tar -xzf komla-v1.0.0-<target>.tar.gz # Windows: unzip komla-v1.0.0-x86_64-pc-windows-msvc.zip
cd komla-v1.0.0-<target>
./komla compress photo.jpg # Komla strong (the default); writes photo.jpg.komla
./komla compress --fast photo.jpg # Komla fast: quicker, a little larger
./komla decompress photo.jpg.komla # restores photo.jpg byte for byte (any mode)
./komla compress image.png # PNG and BMP
./komla decompress image.png.komla -o restored.png # same pixels; PNG metadata (text, ICC profile, gamma) is not kept
- macOS: the binaries are not signed or notarized. If macOS blocks
komla, run
xattr -d com.apple.quarantine komlaonce, or allow it under System Settings > Privacy &
Security. - Linux: x86-64 with glibc 2.34 or newer (Ubuntu 22.04, Debian 12, RHEL 9 and later).
- Windows: x86-64,
komla.exefrom a terminal. - No install: the web app runs the same codec in your browser, and nothing is uploaded:
https://paatai.github.io/Compress/
Checked. Every binary was built and tested on its own platform (the Intel macOS binary
under Rosetta 2). Every test JPEG was round-tripped without a flag (checked to give Komla
strong) and with --strong, --fast and --maximum, restored with one thread and with four,
plus a PNG.
SHA-256 checksums (also in SHA256SUMS.txt):
07c8be337a70d07991a9eeeb1f2af2fb44acd63fad61e32f53c83b868940f9e9 komla-v1.0.0-aarch64-apple-darwin.tar.gz
da5cfedb8ea82899552dc48e32fe8035e6c4382725bd4489022230c670079957 komla-v1.0.0-x86_64-apple-darwin.tar.gz
265f70b2569c6e1db502845b741388e141df58663dbad11237193ac9216d2ec5 komla-v1.0.0-x86_64-pc-windows-msvc.zip
829d7c32bad9b1d4f45098cb8de5e560aef8ce27d1cdcee339f61d6819e360bb komla-v1.0.0-x86_64-unknown-linux-gnu.tar.gz
Verified after publishing: every archive above was downloaded again from this release, checked against SHA256SUMS.txt and tested on its platform with the same round trips (workflow run).