MessagePack Ext
The MessagePack Ext type extends custom types with (type_code, data) pairs, letting the application layer serialize non-standard types.
Purpose
To support application-defined types (e.g., Date, BigInt, custom classes) in MessagePack while keeping binary efficiency.
Mechanism
An Ext type marker (fixext1/2/4/8/16 or ext8/16/32) is followed by a 1-byte type_code (0-127 application-defined) and the raw data. Decoders dispatch on the type_code to custom deserializers.
Use cases
- Custom type serialization
- Date/BigInt extensions
- Application type preservation