A simple, secure, and lightweight C implementation of the MessagePack serialization format, suitable for embedded systems.
MPack is a C implementation of the MessagePack serialization format, providing encoder and decoder functionality for efficient binary data interchange. It solves the performance and size limitations of JSON by offering a compact, fast, and secure alternative for applications like embedded systems, games, and network communication. The library includes features like tree parsing, incremental reading, and customizable builds to fit various constraints.
C developers working on embedded systems, IoT devices, mobile applications, or any project requiring high-performance, low-footprint serialization with security against untrusted data.
Developers choose MPack for its combination of simplicity, security, and speed in a lightweight package, along with extensive platform support and no external dependencies, making it a robust alternative to larger or less secure serialization libraries.
MPack - A C encoder/decoder for the MessagePack serialization format / msgpack.org[C]
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show MPack outperforms many JSON and MessagePack libraries, with some tests being several times faster than RapidJSON, making it ideal for speed-critical applications.
Built-in protection against malicious or malformed input data, with stateful error handling that returns safe defaults like nil values, ensuring robust handling of untrusted sources.
Minimal footprint and no libc requirement, allowing it to run on microcontrollers like Arduino and in the Linux kernel, with configurable features to reduce code size.
Supports memory buffers, files, and custom flush functions, with options for both tree-style and incremental parsing to adapt to different performance and memory constraints.
MPack is implemented solely in C and lacks official bindings for other languages, limiting its use in multi-language ecosystems without additional integration work.
Customizing features at compile-time requires manual setup, such as downloading the amalgamation package or adjusting build flags, which can be more complex than using runtime-configurable libraries.
Strictly supports MessagePack; it does not include native JSON or other serialization formats, so interoperability with JSON-centric systems necessitates custom conversion code.