Provided by: liblcrq0.0_0.2.3-1_amd64
NAME
rq_encode - encode data with RaptorQ
SYNOPSIS
#include <lcrq.h> int rq_encode(rq_t *rq, void *data, const size_t len); Compile and link with -llcrq.
DESCRIPTION
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.
RETURN VALUE
On success, 0 is returned. If encoding fails, the function returns -1.
SEE ALSO
rq_init(3), rq_free(3), rq_decode(3), rq_symbol(3), lcrq(7)