We’re happy to share with you a new native extension for Defold: MessagePack ![]()
It lets you encode Lua values and tables into compact binary data and decode them back into Lua, making it useful for network communication, data storage, and more.
MessagePack is a compact binary serialization format that provides an efficient way to store and exchange structured data.
One of the main advantages of MessagePack is faster decoding. Since the binary format includes information about container sizes, the decoder can allocate Lua tables more efficiently, significantly reducing the number of memory allocations.
Additional benefits include potentially smaller file sizes (although this depends on the data and files can sometimes grow) and making data less human-readable compared to plain-text JSON (obfuscation).
Key features:
Compact binary serialization with MessagePack
Native encoding and decoding, without intermediate data structures
Easy conversion between Lua tables and MessagePack data
Cross-platform support: HTML5, Windows, Linux, macOS, Android, and iOS
Simple API: messagepack.encode()andmessagepack.decode()
The extension is open source and available under the MIT license.
Get it from the Defold Asset Portal:
GitHub repository:
Happy Defolding! ![]()

