Analysis updated 2026-07-03
Encode existing PNG or WebP images into FLIF format using the command-line tool to achieve better compression ratios
Integrate lossless image encoding and decoding into a C++ application using the shared library
Study the MANIAC adaptive compression algorithm as a reference for understanding modern image codec design
| flif-hub/flif | xtensor-stack/xtensor | librevr/revive | |
|---|---|---|---|
| Stars | 3,740 | 3,733 | 3,749 |
| Language | C++ | C++ | C++ |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 3/5 | 3/5 | 3/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires libpng to build the encoder/decoder, SDL2 is also needed for the bundled image viewer. Note: development has stopped and JPEG XL is the recommended successor.
FLIF stands for Free Lossless Image Format, a file format for storing images without any quality loss. Unlike JPEG, which discards some image data to save space, FLIF preserves every pixel exactly. The format was built around a compression technique called MANIAC (Meta-Adaptive Near-zero Integer Arithmetic Coding), which learns patterns in the image while encoding and adjusts its compression approach on the fly. According to benchmarks in the project, FLIF compresses images more efficiently than several other lossless formats, including PNG, WebP in lossless mode, and lossless JPEG 2000. It also supports progressive loading: a partial download of a FLIF file can be decoded as a lower-quality version of the full image, which is useful on slow connections. This repository is the reference implementation, written in C++. It includes a command-line tool for encoding and decoding, a shared library for use in other programs, and a minimal image viewer. Building on Linux requires libpng, the viewer also needs SDL2. Windows and macOS builds are supported as well. Pre-built binaries are available from the releases page, and a Snap package is available for Linux. There is an important caveat: FLIF development has stopped. The format was superseded first by FUIF and then by JPEG XL, which combines ideas from FUIF and another project called Pik. JPEG XL is now the recommended path forward, with its own open-source implementation available separately. The code is released under the GNU Lesser General Public License (LGPL) for the full encoder and decoder, and under Apache 2.0 for the decode-only library. A community of third-party projects grew around FLIF before development stopped, including browser polyfills, GUI converters, Windows image viewer plugins, and bindings for Go, Node.js, and Python. Those projects may or may not be actively maintained today.
FLIF is a now-discontinued lossless image format that outcompressed PNG and WebP, this is its C++ reference encoder and decoder, superseded by JPEG XL for new projects.
Mainly C++. The stack also includes C++, libpng, SDL2.
LGPL for the full encoder and decoder (modifications must be shared as open source), Apache 2.0 for the decode-only library (use freely in any project, open or proprietary).
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.