Monado OpenXR Runtime
Loading...
Searching...
No Matches
u_cobs.c File Reference

Code to decode and encode COBS (Consistent Overhead Byte Stuffing) data. More...

#include <util/u_misc.h>
#include "u_cobs.h"
#include <errno.h>
#include <assert.h>
Include dependency graph for u_cobs.c:

Macros

#define PACKET_DELIMITER   0x00
 

Functions

int u_cobs_decoder_create (size_t buffer_size, cobs_callback_t callback, void *user_data, struct u_cobs_decoder *out_decoder)
 Creates a new COBS decoder.
 
void u_cobs_decoder_destroy (struct u_cobs_decoder *cobs)
 Destroys a COBS decoder previously created by u_cobs_decoder_create.
 
int u_cobs_push_bytes (struct u_cobs_decoder *cobs, const uint8_t *data, size_t length)
 Pushes bytes into the COBS decoder.
 
int u_cobs_encode (const uint8_t *input, size_t input_length, uint8_t *output, size_t output_size)
 Encodes a single packet using COBS.
 

Detailed Description

Code to decode and encode COBS (Consistent Overhead Byte Stuffing) data.

Author
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com