MessagePackabstractCompact binary serialization: pack: a value to Bytes, unpack: it back.
The same value mapping as JSON — and unlike JSON, MessagePack has a native bytes type, so Bytes round-trips without a Base64 detour. Numbers beyond the 64-bit range (a large BigInteger) and any BigDecimal serialize as their exact digits in a string.
MessagePack.pack:#{'a': 1} "* -> Bytes[4] 81 a1 61 01 MessagePack.unpack:(MessagePack.pack:#{'a': 1}) "* -> #{'a': 1}
Serialize a value (Maps, Lists, Strings, numbers, Booleans, Bytes, nil) to MessagePack Bytes.
MessagePack.pack:#(1 2 3) "* -> Bytes[4] 93 01 02 03
Deserialize MessagePack Bytes back into Quoin values — the inverse of pack:. Malformed input throws a ParseError.
(MessagePack.unpack:(MessagePack.pack:#{'a': 1})) == #{'a': 1} "* -> true