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

Go to the source code of this file.

Functions

struct cbor_decoder_result cbor_stream_decode (cbor_data source, size_t source_size, const struct cbor_callbacks *callbacks, void *context)
 Stateless decoder.
 

Function Documentation

◆ cbor_stream_decode()

struct cbor_decoder_result cbor_stream_decode ( cbor_data source,
size_t source_size,
const struct cbor_callbacks * callbacks,
void * context )

Stateless decoder.

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

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

Definition at line 43 of file streaming.c.