1Streaming Decoding 2============================= 3 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: 5 6.. doxygenfunction:: cbor_stream_decode 7 8For example, when :func:`cbor_stream_decode` encounters a 1B unsigned integer, it will invoke the function pointer stored in ``cbor_callbacks.uint8``. 9Complete usage example: `examples/streaming_parser.c <https://github.com/PJK/libcbor/blob/master/examples/streaming_parser.c>`_ 10 11The callbacks are defined by 12 13.. doxygenstruct:: cbor_callbacks 14 :members: 15 16When building custom sets of callbacks, feel free to start from 17 18.. doxygenvariable:: cbor_empty_callbacks 19 20 21Callback types definition 22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 23 24 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 35