2 =============================
4 *libcbor* exposes a stateless decoder that reads a stream of input bytes from a buffer and invokes user-provided callbacks as it decodes the input:
6 .. doxygenfunction:: cbor_stream_decode
8 For example, when :func:`cbor_stream_decode` encounters a 1B unsigned integer, it will invoke the function pointer stored in ``cbor_callbacks.uint8``.
9 Complete usage example: `examples/streaming_parser.c <https://github.com/PJK/libcbor/blob/master/examples/streaming_parser.c>`_
11 The callbacks are defined by
13 .. doxygenstruct:: cbor_callbacks
16 When building custom sets of callbacks, feel free to start from
18 .. doxygenvariable:: cbor_empty_callbacks
21 Callback types definition
22 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 .. doxygentypedef:: cbor_int8_callback
26 .. doxygentypedef:: cbor_int16_callback
27 .. doxygentypedef:: cbor_int32_callback
28 .. doxygentypedef:: cbor_int64_callback
29 .. doxygentypedef:: cbor_simple_callback
30 .. doxygentypedef:: cbor_string_callback
31 .. doxygentypedef:: cbor_collection_callback
32 .. doxygentypedef:: cbor_float_callback
33 .. doxygentypedef:: cbor_double_callback
34 .. doxygentypedef:: cbor_bool_callback