Last active
January 24, 2020 01:38
-
-
Save EquiFox/e7ce698a9f99f344b4dfa3ec4d0be743 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Packet ### | |
byte headerByte; | |
bool isEncrypted = (headerByte & 64) > 0; | |
bool isCompressed = (headerByte & 32) > 0; | |
bool isBlueBoxed = (headerByte & 16) > 0; | |
bool isBigSized = (headerByte & 8) > 0; | |
short dataSize; (int if isBigSized) | |
byte dataType; (Root element should always be 0x12 (Container)) | |
Container container; | |
### Container ### | |
short itemCount; | |
ContainerItem items[itemCount]; | |
### ContainerItem ### | |
ushort itemKeyLength; | |
char itemKey[itemKeyLength]; | |
byte itemDataType; | |
object itemData; | |
### DataType ### | |
NULL = 0x0 | |
BOOL = 0x1 | |
BYTE = 0x2 | |
SHORT = 0x3 | |
INT = 0x4 | |
LONG = 0x5 | |
FLOAT = 0x6 | |
DOUBLE = 0x7 | |
UTF_STRING = 0x8 | |
BOOL_ARRAY = 0x9 | |
BYTE_ARRAY = 0xA | |
SHORT_ARRAY = 0xB | |
INT_ARRAY = 0xC | |
LONG_ARRAY = 0xD | |
FLOAT_ARRAY = 0xE | |
DOUBLE_ARRAY = 0xF | |
UTF_STRING_ARRAY = 0x10 | |
ARRAY = 0x11 | |
CONTAINER = 0x12 | |
CLASS = 0x13 | |
TEXT = 0x14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment