oarc is a command-line tool written in Oberon using the Vishap Oberon Compiler (VOC) that allows you to manipulate .Arc
archive files originally used in Oberon System 3.
These archives are based on LZ77 compression and were used in the classical Oberon system to bundle and distribute sources. This tool enables modern systems to interact with those .Arc
files: listing contents, extracting, adding, or deleting files — all in a native Oberon implementation that runs outside the original OS environment.
This tool was developed to support preservation and access to historical Oberon System 3 archives using modern tooling.
- List archive contents (with optional detail)
- Extract specific files or the entire archive
- Add files to an archive (with optional encryption)
- Delete files from an archive
- Support for several compatible encryption methods
- Faithful reproduction of Oberon S3 archive behavior.
- Minimal dependencies: currently the only dependency outside of libraries distributed with VOC is Unix File System Utils.
- Command-line tool written entirely in Oberon for use on modern systems via VOC.
- Windows is not supported due to reliance on
UnixFS.Mod
.
ArcTool.Mod
: Core.Arc
parsing, compression, and file handlingFileUtil.Mod
: Lists files and abstracts file operations. Depends on standardFiles.Mod
andUnixFS.Mod
oarc.Mod
: Main command-line interface with argument parsing and dispatchCrypt0.Mod
: Encryption methods
A GNUmakefile is provided which fetches dependencies (in this case: UnixFS.Mod), builds them, and compiles the tool using VOC.
To build:
make
This will produce the executable oarc
in the build
directory.
./oarc <command> <archive> [options/files...]
Command | Description |
---|---|
list <archive> [-d] |
List contents of the archive (add -d for details) |
add <archive> [-c cipher] [-e key] <files> |
Add files to archive (optionally encrypted) |
extract <archive> [-c cipher] [-e key] [files] |
Extract specific files (with optional decryption) |
extractall <archive> [-c cipher] [-e key] |
Extract all files (with optional decryption) |
delete <archive> <files> |
Remove specific files from archive |
-d
Show detailed listing (forlist
)-c cipher
Select encryption cipher (default:mod
)-e key
Use specified key to enable encryption/decryption
-
mod
: Parks-Miller PRNG with modular arithmetic (default)- Uses:
ciphertext = (plaintext + keystream) MOD 256
- Uses:
-
heidelberg
: Voyager project cipher fromCrypt0.Mod
(has a bug with 1-char keys!)- Same as
mod
but usesLength(key) - 1
as length - Warning: crashes with single-character passwords — use only for legacy compatibility
- Same as
-
xor
: Simple XOR stream cipher- Uses:
ciphertext = plaintext XOR keystream
- Uses:
-
s3
: Cipher from ETH Oberon System 3CompressCrypt.Mod
- Uses:
ciphertext = plaintext +/- key[i MOD keylen]
- Uses:
# List files
./oarc list WebNavBeta4.Arc
# List with details
./oarc list WebNavBeta4.Arc -d
# Add new files (with encryption)
./oarc add WebNavBeta4.Arc -e mypassword New.Mod More.Text
# Extract files (with cipher and password)
./oarc extract WebNavBeta4.Arc -c heidelberg -e oldkey New.Mod
# Extract all files
./oarc extractall WebNavBeta4.Arc
# Delete files
./oarc delete WebNavBeta4.Arc Old.Mod
- Archives are modified in-place
- Encrypted files are compatible with original Oberon S3 formats (where applicable)
You have to install one of the encryption methods. In Oberon S3 there's CompressCrypt
module.
Compress.Add \C CompressCrypt.Install "key" archive.Arc file0.txt file1.txt ~
or
Compress.Extract \C CompressCrypt.Install "key" archive.Arc file0.txt file1.txt ~
Otherwise, if you use compress system from Voyager project then its Crypt0
file encryption should be used.
Compress.Extract \C Crypt0.Install "key" archive.Arc file0.txt file1.txt ~
GPL-3