ZFEC Forward Error Correction

Index

zfec-decode zfec-encode

Reference

zfec-decodecfunction
(zfec-decode k n indexes inputs)

Decode some FEC shares. `k` is the number of shares required to recover the original. `n` is the total number of shares. The `indexes` is the list specifies which shares are presented in `inputs`. `inputs` is the list of the input shares (e.g. from a previous call to zfec_encode) which all must be the same length. Return a list of strings containing the original shares decoded from the provided shares (in `inputs`).

zfec-encodecfunction
(zfec-encode k n input)

Perform forward error correction encoding. `k` is the number of shares required to recover the original. `n` is the total number of shares. The `input` length must be a multiple of K bytes. Return n list of strings, each one containing a single share.