An open API service indexing awesome lists of open source software.

https://github.com/tsung-wei-huang/cpp-ciri

A Fast Modern C++ Header-only Serialization Library
https://github.com/tsung-wei-huang/cpp-ciri

deserialization deserialization-library deserializer serialization serialization-library serializer

Last synced: 9 months ago
JSON representation

A Fast Modern C++ Header-only Serialization Library

Awesome Lists containing this project

README

          

# Cpp-Ciri

[![Standard](image/cpp17.svg)](https://en.wikipedia.org/wiki/C%2B%2B#Standardization)

A fast modern C++ *header-only* serialization library

# Simple, Compact, and Extensible Serialization

```cpp
#include "ciri.hpp" // ciri is header-only

int main() {

int from{100}, to{0}; // data to serialize and deserialize

std::ostringstream os; // create an output device with a write method
ciri::Ciri ciri(os); // create a serializer "ciri"

auto obytes = os(from); // serialize an integer

std::istringstream is(os.str()); // create an input device with a read method
ciri::Iric iric(is); // create a deserializer "iric"

auto ibytes = is(to); // deserialize an integer

assert(from == to && obytes == ibytes);
}
```