gecko-dev/dom/webauthn/cbor-cpp
Sylvestre Ledru 65f65d0208 Bug 1528492 - Revert '1511181 - Reformat everything to the Google coding style' r=jcj
Differential Revision: https://phabricator.services.mozilla.com/D20065

--HG--
extra : moz-landing-system : lando
2019-02-17 00:54:15 +00:00
..
src Bug 1528492 - Revert '1511181 - Reformat everything to the Google coding style' r=jcj 2019-02-17 00:54:15 +00:00
README.md

README.md

cbor-cpp

Gitter

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();
    }