Code Monkey home page Code Monkey logo

rdbl-code's People

Watchers

 avatar  avatar

rdbl-code's Issues

Add error detection and correction

I'm looking for a nice way to add redundancy to the output of rdbl_enc.

Ideally I'd like to add as little data as possible to allow for a couple of substitution, insertion or deletion errors. Processing of input in rdbl_dec would stop as soon as there's enough data to ensure the whole text is error-free (that is, rdbl_dec would read the text, the checksum, and then NOT read any extra redundancy if everything is error-free; if it isn't, read up to only as many extra words as are needed to recover from the errors).

To use an existing FEC library such as https://github.com/quiet/libfec, I guess I'd need to packetify the data (perhaps making each line a packet), and add a checksum and redundancy to each packet. That could work, but IMO would add quite a lot of overhead.

One simple solution that comes to mind is to simply add a 4-byte checksum, encoded separately and appended (or prepended) to the output of current rdbl_enc. If the checksum matches, great. If not, do a simple bruteforce scan checking for a single substitution error somewhere in the text (prioritizing by key locations i.e. it's common to swap "u" for "i" but uncommon to swap "u" for "x"), and see if the checksum works then. If it still doesn't, give up, report an error, and tell the user to look for the mistake herself.

https://arxiv.org/pdf/1602.06820v2.pdf might be useful.

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.