Reed-Solomon error-correction codes over GF(256) — RS(255, 239), t = 8. Zero-dependency TypeScript library with ports in PHP, Python, Go, Rust, and C++. Licensed Apache-2.0.
- Multi-language ports added (PHP, Python, Go, Rust, C++)
- Test vectors v1 (42 cases, JSON + flat text)
- Root-level
composer.jsonfor Packagist auto-discovery - Root-level
pyproject.tomlfor PyPI builds - ArticleEccCodec prototype (phase6)
- Each port has its own README with usage examples
| Parameter | Value |
|---|---|
| Codeword length (n) | 255 |
| Message length (k) | 239 |
| Parity bytes | 16 |
| Correctable errors (t) | 8 bytes per block |
| Field | GF(256), primitive polynomial 0x11D |
All ports validate against the same test vector set (42 test cases).
| Language | Registry | Package | Install | Status |
|---|---|---|---|---|
| TypeScript | npm | lombokecc |
npm install lombokecc |
✅ 42/42 |
| TypeScript | GPR | @codinglombok/lombokecc |
npm install @codinglombok/lombokecc |
✅ 42/42 |
| PHP | Packagist | codinglombok/lombokecc |
composer require codinglombok/lombokecc |
✅ 42/42 |
| Python | PyPI | lombokecc |
pip install lombokecc |
✅ 42/42 |
| Go | Go | LombokECC-go |
go get github.com/codinglombok/LombokECC-go |
✅ 42/42 |
| Rust | crates.io | lombokecc |
cargo add lombokecc |
✅ 42/42 |
| C++ | Header-only | — | Copy ports/cpp/include/lombok_ecc.hpp |
✅ 42/42 |
npm install lombokeccimport { ReedSolomon } from 'lombokecc';
const rs = new ReedSolomon(255, 239);
const codeword = rs.encode(new Uint8Array([1, 2, 3, 4, 5]));
const decoded = rs.decode(codeword);composer require codinglombok/lombokeccuse CodingLombok\LombokEcc\ReedSolomon;
$rs = new ReedSolomon(255, 239);
$codeword = $rs->encode([1, 2, 3, 4, 5]);
$decoded = $rs->decode($codeword);pip install lombokeccfrom lombok_ecc import ReedSolomon
rs = ReedSolomon(255, 239)
codeword = rs.encode(bytes([1, 2, 3, 4, 5]))
decoded = rs.decode(codeword)go get github.com/codinglombok/LombokECC-gors := lombokecc.New(255, 239)
codeword := rs.Encode([]byte{1, 2, 3, 4, 5})
decoded, _ := rs.Decode(codeword)cargo add lombokecclet rs = lombokecc::ReedSolomon::new(255, 239);
let codeword = rs.encode(&[1, 2, 3, 4, 5]);
let decoded = rs.decode(&codeword).unwrap();#include "lombok_ecc.hpp"
auto rs = lombokecc::ReedSolomon(255, 239);
auto codeword = rs.encode({1, 2, 3, 4, 5});
auto decoded = rs.decode(codeword);# TypeScript
npm ci && npm run build && npm run test:full
bash mutate.sh # mutation testing
# All ports
cd ports && bash run-all.sh├── package.json ← npm (lombokecc)
├── composer.json ← Packagist (codinglombok/lombokecc)
├── pyproject.toml ← PyPI (lombokecc)
├── gf256.ts # GF(256) field arithmetic
├── reed-solomon.ts # RS encoder + decoder
├── test-*.ts # 5 test suites
├── bench.ts # benchmark
├── mutate.sh # mutation testing
├── .github/workflows/
│ ├── ci.yml # test + mutation + packaging + benchmark
│ └── publish-packages.yml # auto-publish on release
└── ports/
├── php/ # Packagist (composer.json at root)
├── python/ # PyPI (pyproject.toml at root)
├── go/ # Go module
├── rust/ # crates.io
├── cpp/ # header-only
└── vectors/ # 42 test cases (JSON + flat text)
Apache-2.0 — see LICENSE
Author: codinglombok Repository: github.com/codinglombok/LombokECC