package reedsolomon

All checked builds pass
  1. Overview
  2. Docs
Reed-Solomon Error Correction CODEC

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.3.tar.gz
sha256=38f8d538461d4e066dbcb5fd88f4baae250b6c6c10c72a93127ab72337facc3d
md5=2e27f840b42c9a9f29ad68b61fab214f

Description

Reed-Solomon Error Coorection CODEC libaray.

Added to opam-repository:

README

reedsolomon

Build Status

Reed-Solomon Error Correction CODEC in OCaml.

The code in the modules Poly, Matrix and Codec is pretty abstract and not very efficient, however, it implements a few different options for decoding Reed-Solomon codes (Peterson, Euclid and Berlekamp-Massey) and both error and erasure correction.

A much faster, error correction only, implementation is provided in the Iter module (not blazingly fast, but not too bad).

open Reedsolomon.Iter

(* code parameters *)
let param = 
  {
    m = 8;
    k = 239;
    t = 8;
    n = 255;
    b = 0;
    prim_poly = 285;
    prim_elt = 2;
  }

(* construct rs codec *)
let rs = Reedsolomon.Iter.init param

(* construct parity from data

   Array.length data = param.k
   Array.length parity = param.t * 2 *)
let () = rs.encode data parity

(* message to send 

   Array.length message = param.n *)
let message = Array.concat [ data; parity ]

(* decode the received and potentially err'd message 

   Array.length received = param.n
   Array.length corrected = param.n *)
let n_corrections = rs.decode received corrected

Dependencies (2)

  1. dune
  2. ocaml >= "4.02.0"

Dev Dependencies

None

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building reedsolomon with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.3 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure