diff options
-rw-r--r-- | kd/oap-0005.md | 74 |
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 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |