aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to 'README')
-rw-r--r--README56
1 files changed, 56 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..9135648
--- /dev/null
+++ b/README
@@ -0,0 +1,56 @@
+ _ _
+ | | (_)
+ | |__ _ ___
+ | '_ \| |/ _ \
+ | |_) | | __/
+ |_.__/|_|\___|
+
+---------------------------------------------------------------------
+
+bie is a tool for generating a simple indexed flat archive.
+
+Example:
+========
+
+$ echo "foo" >a
+$ dd if=/dev/urandom of=b bs=30 count=1
+$ zlib-flate -compress <bie.c >c
+$ bie archive.bie archive.idx a b c
+$ hexdump -C archive.bie
+00000000 66 6f 6f 0a 00 00 00 00 00 00 00 00 00 00 00 00 |foo.............|
+00000010 1b c9 01 82 4f df 1a ec 01 2a dc 0e 3e f1 e7 52 |....O....*..>..R|
+00000020 ed e3 99 3e 70 b0 eb 6f f8 20 49 ba b9 8d 00 00 |...>p..o. I.....|
+00000030 78 9c 95 54 6d 6f d3 30 10 fe 9c fc 8a a3 a8 6b |x..Tmo.0.......k|
+00000040 d2 76 5d 37 10 42 7d 19 2f a5 43 15 65 a0 ad 93 |.v]7.B}./.C.e...|
+00000050 40 6c 1a 21 71 5a ab 89 1d c5 4e c7 c6 fa df b9 |@l.!qZ....N.....|
+... SNIP ...
+$ cat archive.idx
+BIE_ENTRY(a, 0, 4)
+BIE_ENTRY(b, 16, 30)
+BIE_ENTRY(c, 48, 750)
+
+Use:
+====
+
+Create an archive and index from a list of files you wish to access
+from your program.
+
+Use the CPP or another macro processor to expand BIE_ENTRY to some
+code which stores this information in your program.
+
+Read the archive into memory (or link it in) and use the offset and
+size data from the index to read from the archive.
+
+Dependencies:
+=============
+
+eprintf - https://the-tk.com/cgit/eprintf/
+Place in a directory adjacent to the location of the bie sources or
+override EPRINTF_PATH in config.mk
+
+Compilation and Installation:
+=============================
+
+$ echo prefix=/usr >config.mk
+$ make
+# make install