-
Notifications
You must be signed in to change notification settings - Fork 18
Bytecodes
Cole Frederick edited this page May 25, 2018
·
2 revisions
Bytecodes used by Fressian
Code | Range | Notes |
---|---|---|
PRIORITY_CACHE_PACKED | 80 - a0 | Single byte codes for user-cached data |
STRUCT_CACHE_PACKED | a0 - b0 | Single byte codes for tagged structure descriptors. |
LONG_ARRAY | b0 | Array of primitive longs |
DOUBLE_ARRAY | b1 | Array of primitive doubles |
BOOLEAN_ARRAY | b2 | Array of primitive booleans |
INT_ARRAY | b3 | Array of primitive ints |
FLOAT_ARRAY | b4 | Array of primitive floats |
OBJECT_ARRAY | b5 | Array of objects |
MAP | c0 | Heterogeneous map |
SET | c1 | Heterogeneous set |
UUID | c3 | UUID |
REGEX | c4 | Regular expression |
URI | c5 | URI |
BIGINT | c6 | Arbitrary precision integer |
BIGDEC | c7 | Arbitrary precision decimal |
INST | c8 | Instant in time |
SYM | c9 | Namespaced symbol |
KEY | ca | Namespaced keyword |
GET_PRIORITY_CACHE | cc | Lead byte for multibyte-encoded user cache entries. |
PUT_PRIORITY_CACHE | cd | Object that follows should be added to priority cache |
PRECACHE | ce | Cache an object now, without actually making it appear to reader |
FOOTER | cf | Optional footer signalling end of fressian data |
FOOTER_MAGIC | cfcfcfcf | Repetition of footer code |
BYTES_PACKED_LENGTH | d0 - d8 | Packed byte array |
BYTES_CHUNK | d8 | Chunk of a byte arrays |
BYTES | d9 | Unpacked byte array |
STRING_PACKED_LENGTH | da - e2 | Packed string |
STRING_CHUNK | e2 | Chunk of a string |
STRING | e3 | Unpacked string |
LIST_PACKED_LENGTH | e4 - ec | Packed list |
LIST | ec | Unpacked list |
BEGIN_CLOSED_LIST | ed | Variable length list, expect termination with END_COLLECTION |
BEGIN_OPEN_LIST | ee | Variable length list, terminate with END_COLLECTION or end of stream |
STRUCTTYPE | ef | Structure, followed by tag and component count |
STRUCT | f0 | Reference to a cached structure |
META | f1 | Metadata (currently unused) |
ANY | f4 | Placeholder code for data that could be anything |
TRUE | f5 | Boolean true |
FALSE | f6 | Boolean false |
NULL | f7 | Null / nil |
INT | f8 | Unpacked int |
FLOAT | f9 | Float |
DOUBLE | fa | Double |
DOUBLE_0 | fb | The double value 0.0 |
DOUBLE_1 | fc | The double value 1.0 |
END_COLLECTION | fd | End an open collection |
RESET_CACHES | fe | Reset cache codes |
INT_PACKED_1 | ff - 40 | Integer packed into a single byte |
INT_PACKED_2 | 40 - 50 - 60 | Integer packed into two bytes |
INT_PACKED_3 | 60 - 68 - 70 | Integer packed into three bytes |
INT_PACKED_4 | 70 - 72 - 74 | Integer packed into four bytes |
INT_PACKED_5 | 74 - 76 - 78 | Integer packed into five bytes |
INT_PACKED_6 | 78 - 7a - 7c | Integer packed into six bytes |
INT_PACKED_7 | 7c - 7e - 80 | Integer packed into seven bytes |