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
- Host: GitHub
- URL: https://github.com/tsung-wei-huang/cpp-ciri
- Owner: tsung-wei-huang
- License: mit
- Created: 2019-04-30T21:56:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-14T18:13:08.000Z (about 5 years ago)
- Last Synced: 2025-03-27T23:51:08.533Z (10 months ago)
- Topics: deserialization, deserialization-library, deserializer, serialization, serialization-library, serializer
- Language: C++
- Size: 69.3 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cpp-Ciri
[](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);
}
```