Giter Site home page Giter Site logo

fblomqvi / librs Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 94 KB

Library for forward-error-correction with Reed-Solomon codes

License: GNU Lesser General Public License v2.1

Makefile 1.52% M4 33.24% Roff 7.13% C 58.10%
reed-solomon reed-solomon-codes forward-error-correction

librs's Introduction

Build Status

librs is a small library for forward error correction with Reed-Solomon codes. It is based on the Reed-Solomon code in Phil Karn's libfec, but with bugfixes, optimizations and a slightly different interface. The encoder and decoder are general purpose and not optimized for any particular code. The main use case is for simulations with Reed-Solomon codes.

If you need a Reed-Solomon library for production use that is optimized for one specific code, then the various C++ template libraries might be faster and/or better suited for that particular application.

INSTALLATION

If installing from a release tarball, the standard

./configure
make
make install

will suffice. If you're building from git then run

autoreconf -i --force
./configure
make
make install

USAGE

In short

    struct rs_code* rs;

    // init Reed-Solomon code
    rs = rs_init(symsize, gfpoly, fcr, prim, nroots);
    if (!rs)
	    // Handle error!

    /* Encode your data. The data buffer must contain enough space for the
     * parity symbols. More specifically, len = 'length of data' + nroots. */
    rs_encode(rs, data, len, stride);

    // Possible data corruption...

    // Correct errors (no erasures)
    int ret_val = rs_decode(rs, data, len, stride, NULL, 0, NULL);
    if (ret_val < 0)
	// decoding failure, handle appropriately

    // Free resources
    rs_free(rs);

See the man page for more information.

NOTES

The Reed-Solomon encoding used by the library is the BCH view, and the encoding is systematic. For more information, see, for instance, Wikipedia.

librs's People

Contributors

fblomqvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.