rq_init, rq_free - create and free RaptorQ contexts
Contents
Description
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)
Errors
rq_init() can fail with the following errors:
ENOMEM Out of memory. Possibly, the application hit the RLIMIT_AS or RLIMIT_DATA limit described in
getrlimit(2).
Example
Programsource
rq_t *rq;
rq = rq_init(filesize, 1024);
/* your program here */
rq_free(rq); /* free context when done */
Name
rq_init, rq_free - create and free RaptorQ contexts
Return Value
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.
See Also
rq_encode(3), rq_decode(3), rq_symbol(3), lcrq(7) LCRQ 2022-07-07 RQ_INIT(3)
Synopsis
#include<lcrq.h>rq_t*rq_init(constuint64_tF,constuint16_tT);voidrq_free(rq_t*rq);
Compile and link with -llcrq.
