JongChan's binary serialization format. Pronounce as jay-see-bin
.
It targets speed, backward compatibility, ease to implement.
Jcbin's serialization unit is message. The serialized message is array of message fields. Each field consists of 4 bytes header and variable length payload. Every multi-byte data is interpreted with little endian when you are reading it as integer.
aa aa bb cc (dd dd dd dd) ee ee ee (ff)
a
: field numberb
: field versionc
: field lengthd
: extended field length (ifc
is zero)e
: payloadf
: padding to align 4 bytes
If c
(field length) is zero, the field length is d
(extended field length).
Else, the field length is c * 4
.