MessagePack saves type-information to the serialized data. Thus each data is stored in type-data or type-length-data style.
MessagePack supports following types:
- Fixed length types
- Integers
- nil
- boolean
- Floating point
- Variable length types
- Raw bytes
- Container types
- Arrays
- Maps
Each type has one or more serialize format:
- Fixed length types
- Integers
- positive fixnum
- negative fixnum
- uint 8
- uint 16
- uint 32
- uint 64
- int 8
- int 16
- int 32
- int 64
- Nil
- nil
- Boolean
- true
- false
- Floating point
- float
- double
- Integers
- Variable length types
- Raw bytes
- fix raw
- raw 16
- raw 32
- Raw bytes
- Container types
- Arrays
- fix array
- array 16
- array 32
- Maps
- fix map
- map 16
- map 32
- Arrays
The following code provides pure Object Pascal implementation of msgpack according to Format Specification from Dec 31 2012.
-
src/
- msgpack.pas - basic implementation for packing and unpacking data
- msgpack_consts - constant information regarding the protocol
- msgpack_errors - a unit for error resourcestring holdings
- msgpack_bits - a unit that does bit manipulation that does not exists on FPC by itself
-
tests/
- msgpack_testing.lpr - program that uses fpcunit
- convert_testcase.pas - unit test for msgpack.pas
-
examples/
-
docs/
-
license - The following library is using MIT license
-
README.md - this file