зеркало из https://github.com/mozilla/gecko-dev.git
265e672179
# ignore-this-changeset --HG-- extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022 |
||
---|---|---|
.. | ||
src | ||
README.md |
README.md
cbor-cpp
CBOR C++ serialization library
Just a simple SAX-like Concise Binary Object Representation (CBOR).
http://tools.ietf.org/html/rfc7049
Examples
cbor::output_dynamic output;
{ //encoding
cbor::encoder encoder(output);
encoder.write_array(5);
{
encoder.write_int(123);
encoder.write_string("bar");
encoder.write_int(321);
encoder.write_int(321);
encoder.write_string("foo");
}
}
{ // decoding
cbor::input input(output.data(), output.size());
cbor::listener_debug listener;
cbor::decoder decoder(input, listener);
decoder.run();
}