Class PackStream

java.lang.Object
org.neo4j.driver.internal.packstream.PackStream

public class PackStream extends Object
PackStream is a messaging serialisation format heavily inspired by MessagePack. The key differences are in the type system itself which (among other things) replaces extensions with structures. The Packer and Unpacker implementations are also faster than their MessagePack counterparts.

Note that several marker byte values are RESERVED for future use. Extra markers should not be added casually and such additions must be follow a strict process involving both client and server software.

The table below shows all allocated marker byte values.

Allocated marker byte values.
MarkerBinaryTypeDescription
00..7F0xxxxxxx+TINY_INTInteger 0 to 127
80..8F1000xxxxTINY_STRING
90..9F1001xxxxTINY_LIST
A0..AF1010xxxxTINY_MAP
B0..BF1011xxxxTINY_STRUCT
C011000000NULL
C111000001FLOAT_6464-bit floating point number (double)
C211000010FALSEBoolean false
C311000011TRUEBoolean true
C4..C7110001xxRESERVED
C811001000INT_88-bit signed integer
C911001001INT_816-bit signed integer
CA11001010INT_832-bit signed integer
CB11001011INT_864-bit signed integer
CC11001100BYTES_8Byte string (fewer than 28 bytes)
CD11001101BYTES_16Byte string (fewer than 216 bytes)
CE11001110BYTES_32Byte string (fewer than 232 bytes)
CF11001111RESERVED
D011010000STRING_8UTF-8 encoded string (fewer than 28 bytes)
D111010001STRING_16UTF-8 encoded string (fewer than 216 bytes)
D211010010STRING_32UTF-8 encoded string (fewer than 232 bytes)
D311010011RESERVED
D411010100LIST_8List (fewer than 28 items)
D511010101LIST_16List (fewer than 216 items)
D611010110LIST_32List (fewer than 232 items)
D711010111RESERVED
D811011000MAP_8Map (fewer than 28 key:value pairs)
D911011001MAP_16Map (fewer than 216 key:value pairs)
DA11011010MAP_32Map (fewer than 232 key:value pairs)
DB11011011RESERVED
DC11011100STRUCT_8Structure (fewer than 28 fields)
DD11011101STRUCT_16Structure (fewer than 216 fields)
DE11011110RESERVED
DF11011111RESERVED
DF11011111RESERVED
E0..EF1110xxxxRESERVED
F0..FF1111xxxx-TINY_INTInteger -1 to -16