JavaReedSolomon | Backblaze Reed-Solomon Implementation in Java

 by   Backblaze Java Version: Current License: MIT

kandi X-RAY | JavaReedSolomon Summary

kandi X-RAY | JavaReedSolomon Summary

JavaReedSolomon is a Java library. JavaReedSolomon has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

This is a simple and efficient Reed-Solomon implementation in Java, which was originally built at Backblaze. There is an overview of how the algorithm works in my blog post. The ReedSolomon class does the encoding and decoding, and is supported by Matrix, which does matrix arithmetic, and Galois, which is a finite field over 8-bit values. For examples of how to use ReedSolomon, take a look at SampleEncoder and SampleDecoder. They show, in a very simple way, how to break a file into shards and encode parity, and then how to take a subset of the shards and reconstruct the original file. There is a Gradle build file to make a jar and run the tests. Running it is simple. Just type: gradle build. We would like to send out a special thanks to James Plank at the University of Tennessee at Knoxville for his useful papers on erasure coding. If you'd like an intro into how it all works, take a look at this introductory paper. This project is limited to a pure Java implementation. If you need more speed, and can handle some assembly-language programming, you may be interested in using the Intel SIMD instructions to speed up the Galois field multiplication. You can read more about that in the paper on Screaming Fast Galois Field Arithmetic.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              JavaReedSolomon has a low active ecosystem.
              It has 695 star(s) with 143 fork(s). There are 37 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 8 have been closed. On average issues are closed in 3 days. There are 4 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of JavaReedSolomon is current.

            kandi-Quality Quality

              JavaReedSolomon has 0 bugs and 0 code smells.

            kandi-Security Security

              JavaReedSolomon has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              JavaReedSolomon code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              JavaReedSolomon is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              JavaReedSolomon releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              JavaReedSolomon saves you 755 person hours of effort in developing the same functionality from scratch.
              It has 1739 lines of code, 96 functions and 23 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed JavaReedSolomon and discovered the below as its top functions. This is intended to give you an instant insight into JavaReedSolomon implemented functionality, and help decide if they suit your requirements.
            • Main method for testing
            • Implementation of Gaussian elimination
            • Merge this matrix into this matrix
            • This method extracts data from the given shards
            • Returns an array of all polynomials that can be used to generate a hash table
            • Generate a logar table for a given polynomomial
            • Generate a multiplication table
            • Multiply two elements
            • Overrides superclass implementation
            • Check the given number of shards
            • Code of two shards
            • Code the given shard
            • Returns a human - readable string representation of the matrix
            • Code that runs the specified shard
            • Returns a human - readable String representation of this matrix
            • Code of shards
            • Code of Shards
            • Overrides superclass method
            • Compares this matrix to another matrix
            Get all kandi verified functions for this library.

            JavaReedSolomon Key Features

            No Key Features are available at this moment for JavaReedSolomon.

            JavaReedSolomon Examples and Code Snippets

            No Code Snippets are available at this moment for JavaReedSolomon.

            Community Discussions

            Trending Discussions on JavaReedSolomon

            QUESTION

            Porting MATLAB's Reed Solomon function to Java
            Asked 2017-Jul-15 at 07:17

            I have implemented a simple RS error correction scheme in MATLAB with RS(160,80). The basic process is as follows:

            1. I generate a message with length 80 and 8 bits per symbol, and I generate an RS code of length 160.

            2. After generating the RS code, I add/XOR another Galois field of code length 160. (this field contains only 00000000 and 00000001). This is to simulate adding errors in the scheme. This generates my noisy code.

            3. Now, I take another GF field (of a similar type as above [00000000 00000001]) which has < 40 symbols different from the one I used to create the noise. I add/XOR this to the generated noisy code in the previous step.

            4. Finally, I run it through the RS decoder which retrieves my original message.

            My MATLAB function:

            ...

            ANSWER

            Answered 2017-Jul-15 at 07:17

            I looked at the "simple RS" example "GF28" Java code. The decoder appears to handle erasures only (one of the inputs is an array of bad indices). It's using GF(256) based on hex 11B = x^8 + x^4 + x^3 + x + 1, the same as AES encryption. It is somewhat unusual choice since the lowest "primitive" is 3 (all numbers other than zero can be considered to be a power of 3), rather than the fields where the "primitive" is 2. The field polynomial is defined via PX, so it can be easily changed. I'm not sure why it generates tables dynamically instead of generating them during initialization, using a second set of true/false tables to indicate if specific table values have been generated.

            I have a C RS demo program for 8 bit GF(256) fields. It's interactive, you select a field (there are 30 of them), whether to use a self reciprocal polynomial (it's usually not used), if the first consecutive root of the generator polynomial is 1 (if no is specified, then the first consecutive root is the "primitive"), number of parity bytes, and number of data bytes. It handles both erasures and errors, and since it's a demo program, it includes code for the 3 main types of decoder algorithms Peterson matrix algorithm, Sugiyama's adaptation of extended Euclid algorithm, and Berlekamp Massey algorithm, and also Forney algorithm to generate error values. The interactive part could be replaced with code that selects all these parameters. For your situation, change the define for MAXPAR from 20 to 80 (maximum number of parities). The user input is via stdin, so a text input file can be used to run the demo.

            http://rcgldr.net/misc/eccdemo8.zip

            In my demo, to generate a code word, the user enters values (user option "E" or "C"), then enters "N" to encode. To generate errors, the user enters values at specific locations. To generate erasures, the user uses the "P" option to enter erasure values at specific locations. "F" is used to fix (correct) the code word.

            The wiki article includes the logic for the 3 main types of decoders. It also explains the Fourier transform, but the Fourier transform requires using one of the other decoders in order to generate the error polynomial, and isn't practical.

            https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction#Error_correction_algorithms

            Based on your comment I looked at the Zxing library. The method descriptions are a bit terse and use the wrong terminology. Here's a redo of the description:

            Source https://stackoverflow.com/questions/45049018

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install JavaReedSolomon

            You can download it from GitHub.
            You can use JavaReedSolomon like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the JavaReedSolomon component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Backblaze/JavaReedSolomon.git

          • CLI

            gh repo clone Backblaze/JavaReedSolomon

          • sshUrl

            git@github.com:Backblaze/JavaReedSolomon.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Java Libraries

            CS-Notes

            by CyC2018

            JavaGuide

            by Snailclimb

            LeetCodeAnimation

            by MisterBooo

            spring-boot

            by spring-projects

            Try Top Libraries by Backblaze

            B2_Command_Line_Tool

            by BackblazePython

            b2-sdk-python

            by BackblazePython

            b2-sdk-java

            by BackblazeJava

            erasure-coding-durability

            by BackblazePython

            terraform-provider-b2

            by BackblazeGo