#ifndef __MICROCOBS_H__
#define __MICROCOBS_H__

#include <stdint.h>
#include <unistd.h>

struct sg_entry {
	uint8_t *target;
	ssize_t size;
};

ssize_t cobs_encode_sg(const struct sg_entry input[], uint8_t *output, size_t output_len);
ssize_t cobs_encode(const uint8_t *input, size_t input_len, uint8_t *output, size_t output_len);
ssize_t cobs_decode(const uint8_t *input, size_t input_len, uint8_t *output, size_t output_len);

#endif /* __MICROCOBS_H__ */
