Download Latest Version v0.2.0 -- Multi-Language Ports source code.zip (101.9 kB)
Email in envelope

Get an email when there's a new version of LombokECC

Home / v0.1.0
Name Modified Size InfoDownloads / Week
Parent folder
CHANGELOG.md 2026-08-29 2.8 kB
LICENSE 2026-08-29 10.8 kB
README.md 2026-08-29 12.4 kB
v0.1.0 -- First Stable Release source code.tar.gz 2026-08-29 27.0 kB
v0.1.0 -- First Stable Release source code.zip 2026-08-29 34.7 kB
Totals: 5 Items   87.6 kB 0

LombokECC

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.


GitHub

Stars Forks Issues Pull Requests Release License Last Commit Repo Size Downloads Latest Downloads Clones

npm

npm version npm downloads npm total downloads

GitHub Packages

npm GPR

Packagist

Packagist version Packagist downloads

PyPI

PyPI version PyPI downloads

Quality

CI Tests Mutations Zero deps TypeScript Ports Conventional Commits

SourceForge

SF Downloads SF Monthly SF Weekly SourceForge

Community

Contributors Sponsors PRs Welcome

Lombok Ecosystem

LombokClarion LombokCSS LombokCharts LombokQRCode LombokTableSheet LombokAnimate LombokECC LombokPDF LombokUnram


Parameters

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

Installation

npm install lombokecc

ESM only. This package is "type": "module" and has no CommonJS build.

Other registries

Registry Install
npm npm install lombokecc
GitHub Packages npm install @codinglombok/lombokecc
Packagist composer require codinglombok/lombokecc
PyPI pip install lombokecc
Go go get github.com/codinglombok/LombokECC-go@v0.1.0
crates.io cargo add lombokecc
C++ Header-only — copy include/lombok_ecc.hpp

Usage

Encoding

import { ReedSolomon } from 'lombokecc';

const rs = new ReedSolomon(255, 239);

const message = new Uint8Array([1, 2, 3, 4, 5]);
const codeword = rs.encode(message);   // 255 bytes

rs.isValid(codeword);                  // true

Decoding

const corrupted = new Uint8Array(codeword);
corrupted[10] ^= 0xFF;
corrupted[20] ^= 0xAA;

try {
  const decoded = rs.decode(corrupted);      // always 239 bytes
  const recovered = decoded.slice(-message.length);
} catch (err) {
  // more than t errors, or correction failed verification
}

GF(256) arithmetic

import { GF256 } from 'lombokecc/gf256';

const gf = new GF256();
gf.mul(5, 7);    // GF multiplication
gf.div(5, 7);
gf.inv(5);
gf.pow(5, 10);

Algorithms

The decode pipeline: syndromes → Peterson-Gorenstein-Zierler → Chien search → direct error-value solver. All via Gaussian elimination over GF(256). decode() throws when it cannot correct — it never returns unverified data.

Ports

All ports validate against the same test vector set (42 test cases).

Language Registry Status
TypeScript npm ✅ 42/42
PHP Packagist ✅ 42/42
Python PyPI ✅ 42/42
Go proxy.golang.org (pkg.go.dev) ✅ 42/42
Rust crates.io ✅ 42/42
C++ Header-only ✅ 42/42

Testing

npm ci
npm run build

npm test              # quick (test-rs only)
npm run test:full     # all 5 suites
npm run test:stress   # randomised capacity / overcapacity only
./mutate.sh           # mutation testing (12 mutations)
node dist/bench.js    # benchmark

License

Licensed under the Apache License, Version 2.0. See LICENSE.


Author: codinglombok Repository: github.com/codinglombok/LombokECC

Source: README.md, updated 2026-08-29