Is there any good binary serializer & deserializer for C / C++?

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

Our great sponsors
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • SaaSHub - Software Alternatives and Reviews
  • Kaitai Struct

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

    I'm aware there is Kaitai Struct which can handle binary parsing (deserializing). And I have some success previously with python Construct which can do both serialize & deserialize, but it's written in python.

  • cereal

    A C++11 library for serialization

  • InfluxDB

    Collect and Analyze Billions of Data Points in Real Time. Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.

  • Bitsery

    Your binary serialization library

  • reflecxx

    A static reflection framework for C++, using libclang.

    I have a library and tooling that using code generation will allow you to automatically generate serialization/deserialization to your custom binary format. It uses the visitor pattern and code generation for static reflection (eg iterating over fields of a struct). Check it out at https://github.com/jimmyorourke/reflecxx. Particularly it includes an automatic to/from json, which you could use as a starting point for how to write your own visitor.

  • binary_io

    A binary i/o library for C++, without the agonizing pain

    I wrote a library called binary_io, specifically for handling bespoke binary formats

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

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