Are there any libraries for defining and generating code for byte- or bit- aligned messaging or packet formats?

This page summarizes the projects mentioned and recommended in the original post on /r/cpp

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • bitproto

    The bit level data interchange format for serializing data structures (long term maintenance).

  • I had a similar use case for embedded microcontroller work. Unfortunately, the only one that I found that lets you have bit-level control is bitproto. The problem with all these protocol formats is that they require generated sources to be included in your project at compile time.

  • Kaitai Struct

    Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby

  • Kaitai Struct is really good for reading arbitrary formats, but unfortunately cannot write. Also has been a while since the last update there...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts