ReedSolomon

Reed-Solomon error correction over GF(2^n)

Namespace: Com\Tecnick\Barcode\Type

File: ReedSolomon.php line 34

Reed-Solomon error correction over GF(2^n)

Tags

Constants

GF_QRCODE

File: ReedSolomon.php line 57

public int GF_QRCODE = 285

Methods

__construct()

File: ReedSolomon.php line 117

public __construct(int $wsize[, int $primitive = 0 ][, int $firstroot = 1 ]) : mixed

Parameters

  • $wsize : int: Size of a word in bits.
  • $primitive : int = 0: Primitive polynomial of the Galois field, or zero for the one the word size selects in GF.
  • $firstroot : int = 1: Exponent of the first root of the generator polynomial, which is the product of x + a^i over the roots. Aztec, Australia Post and Mailmark count from 1, QR Code and Micro QR Code from 0.

checkwords()

File: ReedSolomon.php line 131

public checkwords(array<string|int, int> $data, int $necc) : array<int, int>

Parameters

  • $data : array<string|int, int>: Array of data codewords to process.
  • $necc : int: Number of error correction bytes.

Return values

array<int, int> —

Array of $necc error correction codewords.