Catalog · How the catalog works
PArc
FreeArc 0.67 rewritten in Free Pascal: a compatible archiver for Windows and Linux, plus its own extended .parc format.
- ★ 2 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
PArc
PArc is a command-line archiver written in Free Pascal for Windows 7+ (x86/x64) and
Linux x64. It uses its own archive format, .parc, designed as a modernized descendant
of the FreeArc container: nanosecond timestamps, Windows attributes, Unix permissions,
symlinks, Reed–Solomon recovery, volumes and authenticated encryption.
PArc does not read or write FreeArc
.arcfiles. The.arcformat is handled by the companion project FreeArc-ex, a C++ support fork of FreeArc 0.67. PArc is the Pascal implementation of the.parcformat.SFX creation was dropped (
-sfxand theparcsfxmodule no longer exist). Existing self-extractors can still be listed, tested and extracted; updating one preserves its stub.
Documentation: manual · format · status · wiki.
Highlights
- Own format:
.parckeeps names, sizes, CRCs and solid blocks from the FreeArc layout, and adds 64-bit nanosecond timestamps, Windows attributes and Unix modes/links as optional directory fields. - Codecs implemented in Pascal (hot loops in inline assembler), no third-party compression
libraries linked; the only C/C++ is FreeArc's own Tornado encoder, used for
tor:10andtor:15where it measured faster (src/parc_torglue.cpp):storing,lzma,ppmd,grzip,dict,rep,delta,tor(Tornado),lzp,mm,tta,4x4,exe(BCJ x86),lz4,dispack070(DisPack),srep(SREP) andcm(context mixing), alone or in chains (exe+dispack070+lzma,srep+lzma, …). - Smaller and faster than FreeArc 0.67.1 at
-m1…-m9on the test corpora.-mxgives the smallest archives that still decompress fast;-mxxadds context mixing (cm) for the absolute smallest archives, at the cost of decompression speed (seedocs/ESTADO.md). - Reed–Solomon recovery record (
-rr): repairs a damaged range or scattered sectors, not just single sectors per group. - Volumes (
-v), strong encryption (-p/-hp: AES/Blowfish/Serpent/Twofish, authenticated, 200k PBKDF2 iterations), stdin/stdout (-si,-so,-). - Long paths (
\\?\on Windows), symlinks/junctions, masks and recursion. - Cancellation leaves no partial files; writes go to a temporary file that replaces the original only on success.
Commands
parc <command> <archive.parc> [files/patterns...] [options]| command | action |
|---|---|
l |
list contents (UTC date, size, CRC, name) |
lb |
list internal blocks (method, sizes, files per block) |
t |
test: decompress and check CRCs, write nothing |
x |
extract with paths |
e |
extract without paths (flat) |
a |
add/replace files; create the archive if needed |
u |
like a, but only replace when the file on disk is newer |
f |
freshen: update only files already in the archive |
d |
delete names or masks from the archive |
r |
repair with the recovery record (writes fixed.<name>) |
parc a backup.parc project/ -m5 -rr # 5% recovery record
parc a photos.parc photos/ -mx -s- # max ratio, fast decode, not solid
parc a photos.parc photos/ -mxx -s- # absolute max ratio (CM), slow decode
parc a secret.parc docs/ -p -hp # encrypted (asks for the password)
parc u backup.parc project/ # update changed files
parc t backup.parc # verify
parc x backup.parc -dpout -o+ # extract, overwrite
parc r backup.parc # repair -> fixed.backup.parcExit codes: 0 OK, 1 usage error, 2 damaged data, 3 unsupported method/parameter,
4 other I/O error, 5 missing/wrong password, 6 finished but some files were unreadable,
130 cancelled.
Build
Requires Free Pascal 3.2 or newer, g++ (linux64) and the MinGW-w64 g++
(x86_64-w64-mingw32-g++, i686-w64-mingw32-g++) for the Windows targets: build.sh compiles
FreeArc's Tornado encoder (reference/freearc-0.67/Compression/Tornado, patched with
src/parc_torglue.patch) and links it statically (no extra DLLs: the .exe imports the same
system DLLs as before, kernel32/user32/shell32/oleaut32/msvcrt).
./build.sh linux64 # default; produces build/linux64/parc
./build.sh win64 # needs the Windows cross toolchain (FPC_CROSS)
./build.sh win32
./build.sh allTested on Linux x64, Windows 10 x64 and Windows 7 SP1 x64 (32- and 64-bit binaries).
Testing
The suite runs against .parc archives and the C reference sources kept in
reference/freearc-0.67/Compression/ for the codecs.
bash tests/cli.sh
bash tests/stdio.sh tests/volumes.sh
bash tests/rs_recovery.sh tests/parc_crypt.sh tests/cm.sh
bash tests/dispack.sh tests/srep.sh tests/bcj.sh
bash tests/run_tornado_tests.sh tests/crypto_vectors.sh
sudo bash tests/fixes.sh
python3 tests/fuzz.py build/linux64/parc 100 build/linux64/*.parcTo compare size and speed against FreeArc 0.67.1 (performance oracle only; .arc is not
read or written by PArc):
ARC_EXE=/path/to/Arc.exe bash tests/bench_vs_freearc.sh some-directoryRepository layout
src/ PArc sources (Free Pascal)
docs/ manual and format specification
tests/ test suite, codec oracles and fuzzers
reference/freearc-0.67/ only Compression/: FreeArc 0.67 codec sources used as
reference and test oracle for the ported codecs
build.sh builds parcThe rest of the original FreeArc 0.67 tree (Haskell sources, Unarc, ArcShellExt, docs) is not
part of PArc; it lives in the FreeArc-ex repository and in PArc's git history (commit
82ea8d9).
Related project
- FreeArc-ex: extended support fork of FreeArc 0.67,
in C++20, for
.arcand the other container formats.
License
GNU General Public License v2.0; see LICENSE.
The codec implementations are ports of FreeArc 0.67 sources by Bulat Ziganshin and
contributors; reference/ preserves the original notices.

