summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-05-05 03:47:08 -0400
committerIan Moffett <ian@osmora.org>2025-05-05 03:47:08 -0400
commit3d254f0b21dc070f7865d114f435a3e713324daa (patch)
treeabd4e40212f0200d9e0e09b0524a98b73a9456ca
parentd1f2a4fb808460271e80416b10500602d8d94632 (diff)
Add OMAR (OAP-0005)main
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--kd/oap-0005.md74
1 files changed, 74 insertions, 0 deletions
diff --git a/kd/oap-0005.md b/kd/oap-0005.md
new file mode 100644
index 0000000..97d298e
--- /dev/null
+++ b/kd/oap-0005.md
@@ -0,0 +1,74 @@
+---
+stand_alone: true
+ipr: none
+cat: std
+status: draft
+area: Systems Engineering
+wg: OSMORA Standards Group
+
+docname: OAP-0005
+
+title: OSMORA Archive Format
+abbrev: OMAR
+lang: en
+kw:
+ - omar
+author:
+- role: editor
+ name: Ian M. Moffett
+ org: OSMORA
+ city: Washington, DC
+ region: Southeast
+ code: 20020
+ email: ian@osmora.org
+
+--- abstract
+
+The OSMORA Archive (OMAR) format is a minimalist replacement for CPIO and TAR perfect
+for use in in-memory filesystems and general usage.
+
+--- middle
+
+# Introduction
+
+OMAR is a simple archive format designed to be minimal and useful for general usage
+as well as for use in in-memory filesystems.
+
+## Purpose
+
+While CPIO and TAR can also get the job done (in too many different ways, that is),
+OMAR simply gets it done while keeping the implementation small and minimal.
+
+# Requirements Language
+
+{::boilerplate bcp14-tagged}
+
+# OMAR header
+
+Before the contents of each file, there MUST be a header that
+describes the file contents. This header contains things such as its
+magic (for validation), file type, length of the filename and the
+length of the file. The file path goes directly after the header
+and its length is denoted by the header filename length field. The
+actual file contents are directly after the filename, if the total
+length of the file is not a multiple of the block size (512) it MUST
+be padded to the nearest 512 byte boundary with zeros. All directories
+are to be padded with 512 bytes where data would be for regular files.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
++--------------------+
+| Magic ("OMAR") | - Signature (4 bytes)
+|--------------------|
+| Type | - File type (1 byte)
+|--------------------|
+| Namelen | - Length of name (1 byte)
+|--------------------|
+| Len | - Length of file (4 bytes)
++--------------------+
+\/\/\/\/\/\/\/\/\/\/\/
+ DATA
+ 00 00 00 00 00 00
+ 00 00 00 00 00 00
+ 00 00 00 00 00 00
+ ... padding
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~