Scroll to navigation

RQ_ENCODE(3) Librecast Programmer's Manual RQ_ENCODE(3)


rq_encode - encode data with RaptorQ


#include <lcrq.h>
int rq_encode(rq_t *rq, void *data, const size_t len);

Compile and link with -llcrq.


This function is used to prepare data for the generation of encoding (original or repair) symbols.

Calls to API functions that generate symbols, such as rq_symbol(3), rq_symbol_random(3) and must be preceded with a call to rq_encode()

rq_encode must be called with a pointer to valid rq_t context, rq and a pointer to data to be encoded of length len bytes.

The object pointed to by data will be used to generate RaptorQ intermediate symbols as per RFC6330. These are referenced by the rq context, and will be free()d when rq_free(3) is called, along with the context itself.


On success, 0 is returned. If encoding fails, the function returns -1.


rq_init(3), rq_free(3), rq_decode(3), rq_symbol(3), lcrq(7)

2022-07-07 LCRQ