libcbor  0.5.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Functions
streaming.h File Reference
#include "cbor/common.h"
#include "callbacks.h"

Go to the source code of this file.

Functions

struct cbor_decoder_result cbor_stream_decode (cbor_data buffer, size_t buffer_size, const struct cbor_callbacks *callbacks, void *context)
 Stateless decoder. More...
 

Function Documentation

§ cbor_stream_decode()

struct cbor_decoder_result cbor_stream_decode ( cbor_data  buffer,
size_t  buffer_size,
const struct cbor_callbacks callbacks,
void *  context 
)

Stateless decoder.

Will try parsing the buffer and will invoke the appropriate callback on success. Decodes one item at a time. No memory allocations occur.

Parameters
bufferInput buffer
buffer_sizeLength of the buffer
callbacksThe callback bundle
contextAn arbitrary pointer to allow for maintaining context.

Definition at line 26 of file streaming.c.