GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • Serialization

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — Simple C++ Serialization & Reflection. Alternatives - C++ Serialization | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

Simple C++ Serialization & Reflection.

Cista is a simple, high-performance, zero-copy C++ serialization & reflection library.

felixguendling logo
cista.rocks    Source Code    Docs    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
6.5
Stable
Activity
6.6
Growing
Stars 2,255
Watchers 38
Forks 159
Last Commit 23 days ago

Description

Cista++ is a simple, open source (MIT license) C++17 high-performance zero-copy way of (de-)serializing C++ data structures.

Programming language: C++
License: MIT License
Tags: Serialization     Performance     C++17    
Latest version: v0.16

Simple C++ Serialization & Reflection. alternatives and similar libraries

Based on the "Serialization" category.
Alternatively, view cista alternatives based on common mentions on social networks and blogs.

  • protobuf

    10.0 9.9 L1 Simple C++ Serialization & Reflection. VS protobuf
    Protocol Buffers - Google's data interchange format
    protocolbuffers logo
  • FlatBuffers

    9.6 8.0 L1 Simple C++ Serialization & Reflection. VS FlatBuffers
    FlatBuffers: Memory Efficient Serialization Library
    google logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • Magic Enum C++

    8.3 8.7 Simple C++ Serialization & Reflection. VS Magic Enum C++
    Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code
    Neargye logo
  • cereal

    8.1 4.6 L2 Simple C++ Serialization & Reflection. VS cereal
    A C++11 library for serialization
    USCiLab logo
  • MessagePack

    7.8 2.7 L1 Simple C++ Serialization & Reflection. VS MessagePack
    MessagePack implementation for C and C++ / msgpack.org[C/C++]
    msgpack logo
  • SimpleBinaryEncoding

    7.7 9.0 L1 Simple C++ Serialization & Reflection. VS SimpleBinaryEncoding
    Simple Binary Encoding (SBE) - High Performance Message Codec
    aeron-io logo
  • protobuf-c

    7.5 0.0 L2 Simple C++ Serialization & Reflection. VS protobuf-c
    Protocol Buffers implementation in C
    protobuf-c logo
  • Bond

    7.2 7.0 L3 Simple C++ Serialization & Reflection. VS Bond
    DISCONTINUED. Bond was a cross-platform framework for working with schematized data. The open-source project ended on March 31, 2025.
    microsoft logo
  • Nameof C++

    6.6 8.7 Simple C++ Serialization & Reflection. VS Nameof C++
    Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum
    Neargye logo
  • Bitsery

    5.4 5.0 Simple C++ Serialization & Reflection. VS Bitsery
    Your binary serialization library
    fraillt logo
  • cppcodec

    4.7 0.0 L2 Simple C++ Serialization & Reflection. VS cppcodec
    Header-only C++11 library to encode/decode base64, base64url, base32, base32hex and hex (a.k.a. base16) as specified in RFC 4648, plus Crockford's base32. MIT licensed with consistent, flexible API.
    tplgy logo
  • The IOD Library

    4.6 0.0 L2 Simple C++ Serialization & Reflection. VS The IOD Library
    Meta programming utilities for C++14. Merged in matt-42/lithium
    matt-42 logo
  • smf

    4.6 0.0 Simple C++ Serialization & Reflection. VS smf
    Fastest RPC in the west
    smfrpc logo
  • protozero

    4.4 7.2 L2 Simple C++ Serialization & Reflection. VS protozero
    Minimalist protocol buffer decoder and encoder in C++
    mapbox logo
  • Boost.Serialization

    3.6 8.3 L3 Simple C++ Serialization & Reflection. VS Boost.Serialization
    Boost.org serialization module
    boostorg logo
  • config-loader

    3.3 2.0 Simple C++ Serialization & Reflection. VS config-loader
    Simple C++ Config Loader Framework(Serialization & Reflection)
    netcan logo
  • LeapSerial

    2.5 0.0 L4 Simple C++ Serialization & Reflection. VS LeapSerial
    The Leap Motion cross-format, cross-platform declarative serialization library
    leapmotion logo
  • cppbor

    1.5 0.0 Simple C++ Serialization & Reflection. VS cppbor
    An implementation of cbor using C++ 17 variants
    RantyDave logo
  • JsonFusion

    1.4 8.7 Simple C++ Serialization & Reflection. VS JsonFusion
    Map structures to/from json
    tucher logo

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of Simple C++ Serialization & Reflection. or a related project?

Add another 'Serialization' Library

Popular Comparisons

  • Simple C++ Serialization & Reflection.
    vs
    cereal
  • Simple C++ Serialization & Reflection.
    vs
    protobuf
  • Simple C++ Serialization & Reflection.
    vs
    Magic Enum C++
  • Simple C++ Serialization & Reflection.
    vs
    FlatBuffers
  • Simple C++ Serialization & Reflection.
    vs
    Bitsery

README

Simple C++ Serialization & Reflection.

Cista++ is a simple, open source (MIT license) C++17 compatible way of (de-)serializing C++ data structures.

Single header - no dependencies. No macros. No source code generation.

  • Raw performance - use your native structs. Supports modification/resizing of deserialized data!
  • Supports complex and cyclic data structures including cyclic references, recursive data structures, etc.
  • Save 50% memory: serialize directly to the filesystem if needed, no intermediate buffer required.
  • Fuzzing-checked though continuous fuzzing using LLVMs LibFuzzer.
  • Comes with a serializable high-performance hash map and hash set implementation based on Google's Swiss Table.
  • Reduce boilerplate code: automatic derivation of hash and equality functions.
  • Built-in optional automatic data structure versioning through recursive type hashing.
  • Optional check sum to prevent deserialization of corrupt data.
  • Compatible with Clang, GCC, and MSVC

The underlying reflection mechanism can be used in other ways, too!

Examples:

Download the latest release and try it out.

Simple example writing to a buffer:

namespace data = cista::raw;
struct my_struct {  // Define your struct.
  int a_{0};
  struct inner {
      data::string b_;
  } j;
};

std::vector<unsigned char> buf;
{  // Serialize.
  my_struct obj{1, {data::string{"test"}}};
  buf = cista::serialize(obj);
}

// Deserialize.
auto deserialized = cista::deserialize<my_struct>(buf);
assert(deserialized->j.b_ == data::string{"test"});

Advanced example writing a hash map to a memory mapped file:

namespace data = cista::offset;
constexpr auto const MODE =  // opt. versioning + check sum
    cista::mode::WITH_VERSION | cista::mode::WITH_INTEGRITY;

struct pos { int x, y; };
using pos_map =  // Automatic deduction of hash & equality
    data::hash_map<data::vector<pos>,
                   data::hash_set<data::string>>;

{  // Serialize.
  auto positions =
      pos_map{{{{1, 2}, {3, 4}}, {"hello", "cista"}},
              {{{5, 6}, {7, 8}}, {"hello", "world"}}};
  cista::buf mmap{cista::mmap{"data"}};
  cista::serialize<MODE>(mmap, positions);
}

// Deserialize.
auto b = cista::mmap("data", cista::mmap::protection::READ);
auto positions = cista::deserialize<pos_map, MODE>(b);

Benchmarks

Have a look at the benchmark repository for more details.

Library Serialize Deserialize Fast Deserialize Traverse Deserialize & Traverse Size
Cap’n Proto 105 ms 0.002 ms 0.0 ms 356 ms 353 ms 50.5M
cereal 239 ms 197.000 ms - 125 ms 322 ms 37.8M
Cista++ offset 72 ms 0.053 ms 0.0 ms 132 ms 132 ms 25.3M
Cista++ raw 3555 ms 68.900 ms 21.5 ms 112 ms 133 ms 176.4M
Flatbuffers 2349 ms 15.400 ms 0.0 ms 136 ms 133 ms 63.0M

Use Cases

Reader and writer should have the same pointer width. Loading data on systems with a different byte order (endianess) is supported. Examples:

  • Asset loading for all kinds of applications (i.e. game assets, GIS data, large graphs, etc.)
  • Transferring data over network
  • shared memory applications

Currently, only C++17 software can read/write data. But it should be possible to generate accessors for other programming languages, too.

Alternatives

If you need to be compatible with other programming languages or require protocol evolution (downward compatibility) you should look for another solution:

  • Protocol Buffers
  • Cap’n Proto
  • Flatbuffers
  • cereal
  • Boost Serialization
  • MessagePack
  • tser
  • ... many more

Documentation

  • Installation and Usage
  • Serialization Reference
  • Custom (De-)Serialization Functions
  • Data Structure Versioning
  • Hash Containers
    • Hashing Framework
    • Equality Framework
    • Benchmark
  • Security

Contribute

Feel free to contribute (bug reports, pull requests, etc.)!


*Note that all licence references and agreements mentioned in the Simple C++ Serialization & Reflection. README section above are relevant to that project's source code only.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.