libCATS
Loading...
Searching...
No Matches
Functions
ldpc.h File Reference

LDPC encoding and decoding. More...

#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Functions

size_t cats_ldpc_encode (uint8_t *data, size_t len)
 LDPC encode a buffer of data.
 
size_t cats_ldpc_decode (uint8_t *buf, size_t buf_len)
 LDPC decode a buffer of data.
 

Detailed Description

LDPC encoding and decoding.

Function Documentation

◆ cats_ldpc_decode()

size_t cats_ldpc_decode ( uint8_t * buf,
size_t buf_len )

LDPC decode a buffer of data.

Parameters
bufInput and output buffer
buf_lenInput length
Returns
New data length or CATS_FAIL if decode failed
Note
Throws LDPC_DECODE_FAIL on failure

◆ cats_ldpc_encode()

size_t cats_ldpc_encode ( uint8_t * data,
size_t len )

LDPC encode a buffer of data.

Parameters
dataInput and output buffer
lenInput length
Returns
New data length
Note
The data buffer must have enough room to accomodate the encoded data (about 2x the input length)