EQRCode v0.1.0 EQRCode.ReedSolomon View Source

Reed-Solomon Error Correction Coding.

Link to this section Summary

Functions

Reed-Solomon encode

Returns generator polynomials in alpha exponent for given error code length

Link to this section Functions

Link to this function encode(arg) View Source
encode({integer(), [0 | 1]}) :: [binary()]

Reed-Solomon encode.

Example:

iex> EQRCode.ReedSolomon.encode(EQRCode.Encode.encode("hello world!"))
<<64, 198, 134, 86, 198, 198, 242, 7, 118, 247, 38, 198, 66, 16,
  236, 17, 236, 17, 236, 45, 99, 25, 84, 35, 114, 46>>
Link to this function generator_polynomial(error_code_len) View Source

Returns generator polynomials in alpha exponent for given error code length.

Example:

iex> EQRCode.ReedSolomon.generator_polynomial(10)
[0, 251, 67, 46, 61, 118, 70, 64, 94, 32, 45]
Link to this function polynomial_division(msg_poly, gen_poly, data_code_len) View Source
polynomial_division(list(), list(), integer()) :: list()

Perform the polynomial division.

Example:

iex> EQRCode.ReedSolomon.polynomial_division([64, 198, 134, 86, 198, 198, 242, 7, 118, 247, 38, 198, 66, 16, 236, 17, 236, 17, 236], [0, 87, 229, 146, 149, 238, 102, 21], 19)
[45, 99, 25, 84, 35, 114, 46]