Continued with file-based stacks:
[core.git] / contrib / file_stack / format.txt
diff --git a/contrib/file_stack/format.txt b/contrib/file_stack/format.txt
new file mode 100644 (file)
index 0000000..12c1886
--- /dev/null
@@ -0,0 +1,20 @@
+A file-based stack:
+===================
+
+This is the format for a file-based stack which works as any Stackable class.
+
+General made up:
+
+Purpose: | "magic"   | separator | count    | position      | separator |
+---------+-----------+-----------+----------+---------------+-----------+
+Bytes:   | 9         | 1         | 20 (hex) | 2 - n^2 (hex) | 1         |
+---------+-----------+-----------+----------+---------------+-----------+
+Example: | STACKv1.0 |    ???    | 0...ff   | 01            |    ???    |
+
+Continued:
+
+Purpose: | name 0 | entry 0    | separator | name 1 | entry 1    | separator | name n | entry n    | EOF |
+---------+--------+------------+-----------+--------+------------+-----------+--------+------------+-----+
+Bytes:   | 10     | 1-n (pack) | 1         | 10     | 1-n (pack) | 1         | 10     | 1-n (pack) | 1   |
+---------+--------+------------+-----------+--------+------------+-----------+--------+------------+-----+
+Example: | foo    |     ...    |    ???    | bar    |     ...    |    ???    | bar    |     ...    | EOF |