Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:MessagePack

From ReverseEngineering.wiki
Format
Extensions .msgpack, .mpk
Endianness big-endian
Website https://msgpack.org
On this wiki Facts · Code · Notes · Topics

Compact binary JSON-like serialization: the first byte of each value gives its type (fixint, fixmap 0x80-0x8f, fixarray 0x90-0x9f, fixstr 0xa0-0xbf, 0xc0-0xdf for nil, bool, bin, ext, floats, ints, str, array, map), big-endian multi-byte values.

Type bytes

0x00-0x7f positive fixint; 0x80-0x8f fixmap (low nibble = pair count); 0x90-0x9f fixarray (count); 0xa0-0xbf fixstr (low 5 bits = length); 0xc0 nil; 0xc1 never used; 0xc2 false; 0xc3 true; 0xc4/c5/c6 bin 8/16/32; 0xc7/c8/c9 ext 8/16/32; 0xca float32; 0xcb float64; 0xcc/cd/ce/cf uint 8/16/32/64; 0xd0/d1/d2/d3 int 8/16/32/64; 0xd4/d5/d6/d7/d8 fixext 1/2/4/8/16; 0xd9/da/db str 8/16/32; 0xdc/dd array 16/32; 0xde/df map 16/32; 0xe0-0xff negative fixint (-32..-1). Multi-byte lengths and numbers are big-endian. An ext value carries an int8 type id then data; ids -128..-1 are reserved by the spec, and type -1 is the Timestamp extension (fixext 4 / fixext 8 / ext 8 with length 12). There is no header or magic: identify by plausibility (a top-level map 0x8N / 0xde followed by fixstr keys 0xa0-0xbf).

Sources

https://github.com/msgpack/msgpack spec.md (format table lines 102-134 read, timestamp ext type -1).

Code & repositories

  • https://github.com/msgpack/msgpack @ 8aa09e2a6a9180a49fc62ecfefe149f063cc5e4b · license: none
    MessagePack specification
    Tested on: source read, not run: read spec.md · checked 2026-10-18; last activity 2024-08-10; no license: not reusable

See also

Format:CBOR, Format:BSON