0285a5f37b26e3a91a0f95254650debf54bb6fe9
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fpk (Forlorn Pak)
Packs a directory tree into a single flat binary archive. C89, no dependencies.
Building
./build.sh debug release tools # Unix
build.bat debug release tools # Windows
Usage
fpk create [-o output.fpk] [-p] [-q] [-v] input_dir
fpk extract [-d output_dir] [-p] [-q] [-v] input.fpk
fpk list input.fpk
create (alias c) walks input_dir recursively (skipping dotfiles) and
writes an archive. If -o is omitted, the output name is derived from the
input directory's basename plus .fpk (e.g. assets/ -> assets.fpk).
extract (alias x) extracts the entries in input.fpk. If -d is
omitted, the output directory is derived from the archive's basename with
.fpk stripped (e.g. assets.fpk -> assets/).
list (alias t) prints the entries in input.fpk without extracting.
Common flags: -p show progress, -q suppress the summary line, -v
print each entry as it's processed.
#include <fpk/fpk.h>
struct fpk *pak = fpk_open("assets.fpk");
fpk_entry_t *entry = fpk_find(pak, "some/file.bin");
void *data = fpk_read(pak, entry, &size);
fpk_close(pak);
See docs/format.md for the on-disk layout.
License
Mozilla Public License 2.0 (MPL-2.0)
Description
Packs a directory tree into a single flat binary archive
135 KiB
0 Stars
1 Watchers
0 Forks
Languages
C
80.7%
Makefile
16.5%
Shell
2.7%