DOKK / manpages / debian 12 / liblcrq0.0 / rq_init.3.en
RQ_INIT(3) Librecast Programmer's Manual RQ_INIT(3)

rq_init, rq_free - create and free RaptorQ contexts

#include <lcrq.h>
rq_t *rq_init(const uint64_t F, const uint16_t T);
void rq_free(rq_t *rq);

Compile and link with -llcrq.

rq_init() creates a new RaptorQ context and sets up the environment.

F The size of the object to encode. This must be a positive integer up to 946270874880.

T The symbol size. This is generally the size of the packet payload we intend to send. This must be a multiple of the Alignment parameter (4).

Call rq_free(3) when done.

rq_free() invalidates and frees a RaptorQ context created with rq_init(3)

rq_init() returns a pointer to a rq_t handle. On error returns NULL and sets errno to ENOMEM.

The rq_free() function returns no value.

rq_init() can fail with the following errors:

Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in getrlimit(2).

rq_t *rq;
rq = rq_init(filesize, 1024);
/* your program here */
rq_free(rq); /* free context when done */

rq_encode(3), rq_decode(3), rq_symbol(3), lcrq(7)

2022-07-07 LCRQ