Added implementation details to the README

This commit is contained in:
jsrobson10 2020-07-22 15:48:08 +10:00 committed by GitHub
parent 471fbfe42b
commit 42374c79c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 0 deletions

View File

@ -9,6 +9,7 @@
- <a href="#arrays">Arrays</a> - <a href="#arrays">Arrays</a>
- <a href="#named-lists">Named lists</a> - <a href="#named-lists">Named lists</a>
- <a href="#saving-classes">Saving classes</a> - <a href="#saving-classes">Saving classes</a>
- <a href="#implementation-details">Implementation details</a>
### Overview ### Overview
@ -262,3 +263,46 @@ hello.hello();
manager.save(); 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)