Giter VIP home page Giter VIP logo

reed-solomon's Introduction

Compiling

Make sure you have libfec-dev or equivalent installed. If your OS does not have this as package, check out out KA9Q's site

Also make sure you have cmake.

Then:

mkdir build; cd build 
cmake ..
make

Then try:

./rscmd --help

This command will allow you to encode and decode messages using all Reed-Solomon configurations, as long as the symbol size is 8 bits.

A sample run:

$ ./rscmd "bert hubert"
nroots: 32
prim: 11
fcr: 121
poly: 1 + x + x^2 + x^7 + x^8
polyval: 0x187
(N,K) = (255,223)
The 32 parity bytes for "bert hubert": ddaa8fd46499675b712186a0da1dd8738bee3df7f25b49c2c0e84e4a8fe8137b

This runs the command with the most bog standard Reed-Solomon settings, and creates 32 parity bytes for the string "bert hubert".

To test if it worked, let us corrupt this string a bit (or arguably fix it):

$ ./rscmd "nerd hubert" ddaa8fd46499675b712186a0da1dd8738bee3df7f25b49c2c0e84e4a8fe8137b
nroots: 32
prim: 11
fcr: 121
poly: 1 + x + x^2 + x^7 + x^8
polyval: 0x187
(N,K) = (255,223)
Fixed 2 corruptions in positions: 0 3
Recovered: bert hubert

Exercising

If you are unsure about your chosen parameters, try --exercise somestring. This will do 10000 encode/decode cycles, where each time the message is mangled as much as possible while staying within what should be recoverable.

reed-solomon's People

Contributors

berthubert avatar

Watchers

James Cloos 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.