Table of contents
Namespace: Com\Tecnick\Barcode\Type
File: ReedSolomon.php line 34
Reed-Solomon error correction over GF(2^n)
Tags
- since: 2023-10-13
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2023-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-barcode
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.