From 42374c79c566ea3c87481b5d3a20803fd74d6ce6 Mon Sep 17 00:00:00 2001
From: jsrobson10 <45777442+jsrobson10@users.noreply.github.com>
Date: Wed, 22 Jul 2020 15:48:08 +1000
Subject: [PATCH] Added implementation details to the README
---
README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git a/README.md b/README.md
index 9d465ac..42a5636 100644
--- a/README.md
+++ b/README.md
@@ -9,6 +9,7 @@
- Arrays
- Named lists
- Saving classes
+- Implementation details
### Overview
@@ -262,3 +263,46 @@ hello.hello();
manager.save();
```
+
+### Implementation details
+
+All integer data types used are signed and Big Endian.
+
+**Type (1 byte)**
+```
+0: BOOLEAN (1 byte, 0x00 or 0x01)
+1: INTEGER (4 bytes)
+2: LONG (8 bytes)
+3: SHORT (2 bytes)
+4: BYTE (1 byte)
+5: DOUBLE (8 bytes)
+6: FLOAT (4 bytes)
+
+7: STRING
+8: ARRAY
+9: NAMED_LIST
+
+10: EMPTY (0 bytes)
+
+11: ARRAY_BOOLEAN
+12: ARRAY_INTEGER
+13: ARRAY_LONG
+14: ARRAY_SHORT
+15: ARRAY_BYTE
+16: ARRAY_DOUBLE
+17: ARRAY_FLOAT
+```
+
+**Object**
+- Type (signed byte, 1 byte)
+- Payload (Any type, variable length)
+
+**NamedList**
+- Key size (signed int, 4 bytes)
+- Key (variable length)
+- Payload size (signed int, 4 bytes)
+- Payload (Object, variable length)
+
+**Array**
+- Payload size (signed int, 4 bytes)
+- Payload (Object, variable length)