FXC is a high-performance command-line compression utility developed in Lazarus/Free Pascal. It employs a recursive multi-layer approach based on Order-1 Context Modeling, Move-To-Front (MTF) transforms, and Golomb-Rice coding.
- Name: Calogiuri Enzo Antonio
- Email: ecalogiuri@gmail.com
- Date: 2025-31-12
The compressor uses a context-based statistical model. For every byte, it predicts the next one based on the previous symbol (Order-1). The symbols are then ranked via MTF and encoded using adaptive Golomb-Rice codes.
If the -9 flag is used, the program will perform Recursive Compression:
- It compresses the input file (Layer 1).
- If the result is smaller, it treats Layer 1 as a new input and compresses it again (Layer 2).
- This continues until the file stops shrinking or reaches the 255-layer limit.
You need the Lazarus IDE or Free Pascal Compiler installed.
lazbuild fxc.lpi
Once compiled, you can use the executable from the command line:
fxc [arguments] [input-file] [output-file]
Flag,Description
-0,Store: Only adds the header without compressing. -1,Fast: Performs a single compression pass (Default). -9,Max: Performs recursive multi-pass compression. -d,Decompress: Forces decompression mode. -z,Compress: Forces compression mode. -f,Force: Overwrites the output file if it already exists.
./fxc -9 documents.tar documents.tar.x
./fxc -d -f documents.tar.x documents.tar
This project is licensed under the GNU General Public License (GPL) v3.0. See the LICENSE file for the full text.