RQ_ENCODE(3)
β¨ RQ_ENCODE(3) β¨
okay bestie, gather round, it's giving Librecast Programmer's Manual energy and we're about to talk about rq_encode from lcrq π
πΈ 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 π
so like, this function is the prep step. it gets your data ready so that encoding symbols β original ones or repair ones β can actually be generated. no cap. β¨
calls to the API functions that generate symbols, like rq_symbol(3) and rq_symbol_random(3), have to be preceded by a call to rq_encode(). it's literally the prerequisite. the way that you cannot skip it. π
you call rq_encode with a pointer to a valid rq_t context, rq, plus a pointer to the data you want encoded, which is len bytes long.
the object that data points to gets used to generate RaptorQ intermediate symbols as per RFC6330 π. those intermediate symbols are referenced by the rq context, and they get free()d when rq_free(3) is called β along with the context itself. so yeah, the context is holding onto them for you the whole time, main character energy fr fr. π
β RETURN VALUE β
- on success,
0is returned π - if encoding fails, the function returns
-1π
π«Ά SEE ALSO π«Ά
rq_init(3), rq_free(3), rq_decode(3), rq_symbol(3), lcrq(7)
and that's the whole page, bestie!! this one's from the LCRQ girlies, dated 2022-07-07 π go forth and encode, you've got this ππ
π¦ where this page comes from
- debian bookworm: liblcrq0.0 0.0.1-2 Β· GPL-2.0-only OR GPL-3.0-only
- debian trixie: liblcrq0.0 0.2.3-1 Β· GPL-2.0-only OR GPL-3.0-only
- nixos 26.05: lcrq 0.3.1
- nixpkgs unstable: lcrq 0.4.1
- ubuntu noble: liblcrq0.0 0.1.2-1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu questing: liblcrq0.0 0.2.3-1
- ubuntu resolute: liblcrq0.0 0.3.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- ubuntu stonking: liblcrq0.0 0.3.1-1 Β· GPL-2.0-only OR GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms