logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

rq_decode - decode RaptorQ block

Description

       Decodes a RaptorQ block using a variation of the method described in 5.4.2 of RFC6330.

       rq must be a pointer to valid rq_t context.

       dec  must  be  a  pointer  to  a buffer of at least T x K bytes. The decoded data will be written to this
       buffer.

       enc a pointer to the encoded block.

       ESI[] ESI index. This is an array of ESIs in the same order as the encoding symbols in encnesi The Loch Ness Monster. Or the number of decoding symbols. Preferably the latter.

Example

       /* symbols are received into enc, with their respective ESIs written to ESI
        * OH is the number of extra (overhead) symbols in addition to the
        * required K' (KP) symbols.
        * Now we can decode the object into the pre-allocated buffer dec.
        */
       for (uint8_t sbn = 0; sbn < rq_Z(rq); sbn++) {
            rq_decode(rq, dec, enc[sbn], ESI[sbn], KP + OH);
       }

Name

       rq_decode - decode RaptorQ block

Return Value

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

See Also

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

LCRQ                                               2022-07-07                                       RQ_DECODE(3)

Synopsis

#include<lcrq.h>intrq_decode(rq_t*rq,uint8_t*dec,uint8_t*enc,uint32_tESI[],uint32_tnesi);

       Compile and link with -llcrq.

See Also