ark is a crash-safe archive and compression tool for Linux and OpenBSD. It
creates .ark files with integrated Deflate compression, per-member hashes, an
index hash, sandboxed operations, and atomic writes via vendored
libchevron.
ark is a command-line tool, not a library, and it does not read or write
tar, zip, or other existing archive formats.
- Single
.arkarchive format with built-in Deflate compression - Per-member and index integrity verification
- Parallel create and extract using fixed 1MB chunks
- Crash-safe archive writes via vendored libchevron
- Mandatory sandboxing: Landlock/seccomp-bpf on Linux,
pledge(2)andunveil(2)on OpenBSD - Standalone recovery reader generation for long-term archive recovery
- Linux 5.13+ or OpenBSD 6.4+
- x86_64 or ARM64
- C11 compiler
make- No external runtime dependencies beyond libc/pthread
- Vendored libchevron
Linux 5.13 is a hard minimum because Landlock sandboxing is mandatory. On Linux 5.13 through 5.18, extracting archives containing hardlinks is rejected before filesystem side effects because hardlink extraction requires Landlock ABI v2, available from Linux 5.19.
make releaseThe binary is written to:
build/arkInstall the binary and manual page:
make installThe default prefix is /usr/local. Override it with:
make install PREFIX="$HOME/.local"Run the test suite:
make testCreate an archive:
ark create archive.ark pathList archive contents:
ark list archive.arkVerify archive integrity:
ark verify archive.arkExtract into a directory:
ark extract --output restored archive.arkGenerate a standalone recovery reader:
ark generate-reader recovery.c
cc -O2 recovery.c -o recoverark generate-reader writes a self-contained C11 source file that can extract
v1 .ark archives without requiring ark itself. The intended preservation
workflow is to keep both files together:
archive.ark
recovery.c
If this repository disappears, or if ark is not installed many years later,
anyone with a C11 compiler can build the recovery reader and extract the
archive:
cc -O2 recovery.c -o recover
./recover archive.arkThe generated file includes a Deflate decompressor, BLAKE3 and SHA-256
implementations, archive read logic, and a minimal extraction program. See
ARCHITECTURE.md section 15 for the full recovery model.
[Fixed header] 16 bytes
[Member data] Deflate-compressed 1MB chunks
[Index] Member metadata, offsets, chunk sizes, hashes
[Footer] 64 bytes, contains index location and hash
All multi-byte fields are little-endian. The index is verified before
extraction touches the filesystem. See ARCHITECTURE.md for the full format
specification.
- Not compatible with tar, zip, or other archive formats
- No encryption
- No ACL, SELinux context, or extended attribute preservation
--overwriteis not rollback-safe- Index metadata is buffered in memory
- Compression is always enabled; there is no store-only mode
- Recovery readers are separate companion files and must be kept with archives
See ARCHITECTURE.md section 17 for the complete limitations list.
man/ark.1- command referenceARCHITECTURE.md- format and implementation specificationTECH_STACK.md- build and platform requirementsTESTING.md- validation strategyDEVELOPMENT.md- implementation history and milestones- libchevron - vendored
crash-safe write library used by
ark