First standalone, 100% native C/C++ FreeArc archiver and extractor (Zero Haskell, Zero Wine)
C++
0
1 commits
updated Oct 1, 2026
A modern, standalone, 100% native C/C++ implementation of the FreeArc (.arc) archive format.
Historically, FreeArc's archive encoder (arc) never existed in C or C++.
The original FreeArc project created by Bulat Ziganshin was divided into two fundamentally different parts:
Compression/) & Extractor (unarc): Written in C/C++, serving exclusively as backend filter libraries (compiled as DLLs/SOs) and a lightweight extraction utility (unarc). The C/C++ codebase contained zero archive creation, block generation, or file management logic.arc): A massive monolithic program written in Haskell (over 40,000 lines of code across Arc.hs, Package.hs, etc.). All core archiving logic—block layout, directory structuring, file sorting, solid stream grouping, CLI parsing, and encryption management—was implemented purely in Haskell and compiled with GHC 6.10 / 6.12 under 32-bit Windows back in 2008–2010.Because the original Haskell codebase depends strictly on legacy GHC 6.x compilers from over 15 years ago, compiling it on modern Linux distributions (Debian 12, Arch, Ubuntu, Fedora) is practically impossible due to deep compiler bitrot and incompatible runtime dependencies.
mirror/freearc: A Git mirror of the original SourceForge SVN repository (frozen around 2010). ~90% of the archiver codebase is 32-bit Haskell. The C/C++ sources only build the extraction tool (unarc) and standalone filter DLLs.despawnerer/freearc: An attempt to make the legacy Haskell codebase compile with recent GHC on macOS. However, archive extraction was left incomplete ("[ ] Extracting existing FreeArc archives (not done)"), and it still requires a heavy Haskell / Cabal toolchain.Bulat-Ziganshin/FA ("FreeArc Next"): Around 2015, Bulat Ziganshin started an experimental C++ rewrite, but abandoned the project before it reached a functional archiver.Consequently, to create or maintain FreeArc archives on Linux, users and developers were left with only two choices:
arc.exe) through Wine.This project fills this 15-year gap by providing a 100% native C/C++ suite that is modern, autonomous, and fast:
arc ~427 KB, unarc ~197 KB, arc.sfx ~194 KB).HEADER_BLOCK, DATA_BLOCK, DIR_BLOCK, FOOTER_BLOCK) with bit-for-bit CRC32 accuracy, fully interoperable with legacy FreeArc tools.unsigned long 64-bit struct member alignment errors in the Multimedia (MM) filter WAVE headers.-hp) and data block encryption (-p)..sfx and .run payloads without external dependencies.a), update (u), freshen (f), delete (d), move (m), list (l/v), test (t), extract (x/e), and pipe (p/-so).-m1 to -m5x)-bcj / -exe)-rep)-delta)-dict)-lzp)-mm)-p) or full header + data (-hp)..sfx or .run executables (arc a -sfx setup.run ...).arc s archive.arc installer.run).cat bin/arc.sfx my.arc > my.run && chmod +x my.run).chmod 0755, etc.).symlink -> target) transparently.@listfile support.arc p, unarc p, -so).| Binary | Size | Description |
|---|---|---|
bin/arc | ~427 KB | Full archiver and archive manager (create, update, freshen, delete, move, SFX conversion) |
bin/unarc | ~197 KB | Standalone unpacker, lister, and integrity tester |
bin/arc.sfx | ~194 KB | Standalone Linux ELF stub for self-extracting packages (.sfx / .run) |
# Clone the repository
git clone https://github.com/seb3773/freearc-c.git
cd freearc-c
# Compile production binaries
make
# Run the automated 23-test validation suite
make test
# (Optional) Build standalone Debian .deb package
make deb
sudo make install
By default, binaries are installed to /usr/local/bin (arc, unarc) and /usr/local/lib/freearc (arc.sfx). To customize:
sudo make install PREFIX=/usr
# Create a standard solid archive with default compression (LZMA)
arc a backup.arc documents/
# Maximum compression with executable and dictionary filters
arc a -m5 -bcj -dict project.arc src/
# Using specific codecs: Tornado, PPMD, or GRZip
arc a -m tor fast.arc logs/
arc a -m ppmd text.arc books/
arc a -m grzip data.arc files/
# Encrypted archive (AES-256 with hidden directory listing)
arc a -hp "MySecretPassword" private.arc finance/
# Update newer files and add new files
arc u project.arc src/
# Freshen existing files only (no new files added)
arc f project.arc src/
# Delete files matching a pattern from the archive
arc d project.arc "*.tmp" "build/*"
# Move files to archive (removes source files after archiving)
arc m archive.arc old_logs/
# Create a standalone self-extracting Linux executable directly
arc a -sfx setup.run app_payload/
# Run the installer anywhere (extracts autonomously)
./setup.run -d /opt/my_app
# Convert an existing .arc archive to an SFX executable
arc s package.arc package.run
# List archive contents
unarc l backup.arc
# Verbose listing with Unix permissions, packed sizes, and CRC32
unarc v backup.arc
# Test archive integrity
unarc t backup.arc
# Extract with full directory tree
unarc x -dp /destination/path backup.arc
# Extract flat (without directory paths)
unarc e -dp /destination/path backup.arc
# Extract a file directly to stdout (pipeline)
unarc p backup.arc README.txt | grep "version"
.
├── bin/ # Compiled standalone binaries (arc, unarc, arc.sfx)
├── build.sh # Fast multi-mode build script
├── build_deb.sh # Complete build + test + Debian .deb packager
├── Makefile # Root Makefile (all, debug, clean, test, deb, install)
├── README.md # Project documentation
├── LICENSE # GPL-2.0 License
├── man/ # Standard roff manual pages (arc.1, unarc.1)
├── src/ -> unarc/ # Symlink to source directory
├── unarc/ # Core C++ source files, headers, and codecs
│ ├── arc.cpp # Archiver CLI & management logic
│ ├── unarc.cpp # Unpacker CLI & extraction logic
│ ├── ArcStructure.h # FreeArc archive format structures & parser
│ ├── ArcProcess.h # High-level archive processing routines
│ ├── ArcCommand.h # CLI options parser & dispatcher
│ └── Compression/ # Compression codecs (LZMA, PPMD, GRZip, Tornado, TTA, Filters)
├── tests/
│ └── run_tests.sh # Comprehensive 23-test automated test suite
└── tests_files/ # Test artifacts
├── corpus/ # Standard test corpus (binaries, text, code, nested dirs)
└── samples_legacy/ # Legacy FreeArc .arc archives (example.arc, data2.arc)
Build a standard .deb package with a single command:
./build_deb.sh
This automatically compiles the suite, validates the test suite, and installs stripped binaries, manpages, and documentation into a standalone Debian package (freearc_1.0-1_amd64.deb).
To install the generated package:
sudo dpkg -i freearc_1.0-1_amd64.deb
C++
59.9%
C
38.5%
Shell
1.0%
First standalone, 100% native C/C++ FreeArc archiver and extractor (Zero Haskell, Zero Wine)
C++
0
1 commits
updated Oct 1, 2026
A modern, standalone, 100% native C/C++ implementation of the FreeArc (.arc) archive format.
Historically, FreeArc's archive encoder (arc) never existed in C or C++.
The original FreeArc project created by Bulat Ziganshin was divided into two fundamentally different parts:
Compression/) & Extractor (unarc): Written in C/C++, serving exclusively as backend filter libraries (compiled as DLLs/SOs) and a lightweight extraction utility (unarc). The C/C++ codebase contained zero archive creation, block generation, or file management logic.arc): A massive monolithic program written in Haskell (over 40,000 lines of code across Arc.hs, Package.hs, etc.). All core archiving logic—block layout, directory structuring, file sorting, solid stream grouping, CLI parsing, and encryption management—was implemented purely in Haskell and compiled with GHC 6.10 / 6.12 under 32-bit Windows back in 2008–2010.Because the original Haskell codebase depends strictly on legacy GHC 6.x compilers from over 15 years ago, compiling it on modern Linux distributions (Debian 12, Arch, Ubuntu, Fedora) is practically impossible due to deep compiler bitrot and incompatible runtime dependencies.
mirror/freearc: A Git mirror of the original SourceForge SVN repository (frozen around 2010). ~90% of the archiver codebase is 32-bit Haskell. The C/C++ sources only build the extraction tool (unarc) and standalone filter DLLs.despawnerer/freearc: An attempt to make the legacy Haskell codebase compile with recent GHC on macOS. However, archive extraction was left incomplete ("[ ] Extracting existing FreeArc archives (not done)"), and it still requires a heavy Haskell / Cabal toolchain.Bulat-Ziganshin/FA ("FreeArc Next"): Around 2015, Bulat Ziganshin started an experimental C++ rewrite, but abandoned the project before it reached a functional archiver.Consequently, to create or maintain FreeArc archives on Linux, users and developers were left with only two choices:
arc.exe) through Wine.This project fills this 15-year gap by providing a 100% native C/C++ suite that is modern, autonomous, and fast:
arc ~427 KB, unarc ~197 KB, arc.sfx ~194 KB).HEADER_BLOCK, DATA_BLOCK, DIR_BLOCK, FOOTER_BLOCK) with bit-for-bit CRC32 accuracy, fully interoperable with legacy FreeArc tools.unsigned long 64-bit struct member alignment errors in the Multimedia (MM) filter WAVE headers.-hp) and data block encryption (-p)..sfx and .run payloads without external dependencies.a), update (u), freshen (f), delete (d), move (m), list (l/v), test (t), extract (x/e), and pipe (p/-so).-m1 to -m5x)-bcj / -exe)-rep)-delta)-dict)-lzp)-mm)-p) or full header + data (-hp)..sfx or .run executables (arc a -sfx setup.run ...).arc s archive.arc installer.run).cat bin/arc.sfx my.arc > my.run && chmod +x my.run).chmod 0755, etc.).symlink -> target) transparently.@listfile support.arc p, unarc p, -so).| Binary | Size | Description |
|---|---|---|
bin/arc | ~427 KB | Full archiver and archive manager (create, update, freshen, delete, move, SFX conversion) |
bin/unarc | ~197 KB | Standalone unpacker, lister, and integrity tester |
bin/arc.sfx | ~194 KB | Standalone Linux ELF stub for self-extracting packages (.sfx / .run) |
# Clone the repository
git clone https://github.com/seb3773/freearc-c.git
cd freearc-c
# Compile production binaries
make
# Run the automated 23-test validation suite
make test
# (Optional) Build standalone Debian .deb package
make deb
sudo make install
By default, binaries are installed to /usr/local/bin (arc, unarc) and /usr/local/lib/freearc (arc.sfx). To customize:
sudo make install PREFIX=/usr
# Create a standard solid archive with default compression (LZMA)
arc a backup.arc documents/
# Maximum compression with executable and dictionary filters
arc a -m5 -bcj -dict project.arc src/
# Using specific codecs: Tornado, PPMD, or GRZip
arc a -m tor fast.arc logs/
arc a -m ppmd text.arc books/
arc a -m grzip data.arc files/
# Encrypted archive (AES-256 with hidden directory listing)
arc a -hp "MySecretPassword" private.arc finance/
# Update newer files and add new files
arc u project.arc src/
# Freshen existing files only (no new files added)
arc f project.arc src/
# Delete files matching a pattern from the archive
arc d project.arc "*.tmp" "build/*"
# Move files to archive (removes source files after archiving)
arc m archive.arc old_logs/
# Create a standalone self-extracting Linux executable directly
arc a -sfx setup.run app_payload/
# Run the installer anywhere (extracts autonomously)
./setup.run -d /opt/my_app
# Convert an existing .arc archive to an SFX executable
arc s package.arc package.run
# List archive contents
unarc l backup.arc
# Verbose listing with Unix permissions, packed sizes, and CRC32
unarc v backup.arc
# Test archive integrity
unarc t backup.arc
# Extract with full directory tree
unarc x -dp /destination/path backup.arc
# Extract flat (without directory paths)
unarc e -dp /destination/path backup.arc
# Extract a file directly to stdout (pipeline)
unarc p backup.arc README.txt | grep "version"
.
├── bin/ # Compiled standalone binaries (arc, unarc, arc.sfx)
├── build.sh # Fast multi-mode build script
├── build_deb.sh # Complete build + test + Debian .deb packager
├── Makefile # Root Makefile (all, debug, clean, test, deb, install)
├── README.md # Project documentation
├── LICENSE # GPL-2.0 License
├── man/ # Standard roff manual pages (arc.1, unarc.1)
├── src/ -> unarc/ # Symlink to source directory
├── unarc/ # Core C++ source files, headers, and codecs
│ ├── arc.cpp # Archiver CLI & management logic
│ ├── unarc.cpp # Unpacker CLI & extraction logic
│ ├── ArcStructure.h # FreeArc archive format structures & parser
│ ├── ArcProcess.h # High-level archive processing routines
│ ├── ArcCommand.h # CLI options parser & dispatcher
│ └── Compression/ # Compression codecs (LZMA, PPMD, GRZip, Tornado, TTA, Filters)
├── tests/
│ └── run_tests.sh # Comprehensive 23-test automated test suite
└── tests_files/ # Test artifacts
├── corpus/ # Standard test corpus (binaries, text, code, nested dirs)
└── samples_legacy/ # Legacy FreeArc .arc archives (example.arc, data2.arc)
Build a standard .deb package with a single command:
./build_deb.sh
This automatically compiles the suite, validates the test suite, and installs stripped binaries, manpages, and documentation into a standalone Debian package (freearc_1.0-1_amd64.deb).
To install the generated package:
sudo dpkg -i freearc_1.0-1_amd64.deb
C++
59.9%
C
38.5%
Shell
1.0%