Search code examples
javafileredundancyreed-solomon

Reed Solomon Java Library - Partitioning files with redundancy


I'm looking for Java libraries of the Reed Solomon algorithm.

What I need is to partition a given file in different chunks with redundancy. So, after partitioning in N chunks, I can re-build the file with just K of these chunks (Where k < N). This is supposed to be one of the key features of Reed Solomon.

This is what I have tried:

  1. I found zxing, I downloaded the core-x.x.jar and run the tests successfully in my computer. But, by reading the code I realised that it was written to only support QR codes.

  2. I have tried this library also, but it does not work properly and it has not been updated in the last 4 years.

  3. I'm starting this project and I want to do it in Java; however, since the only library highly supported is written in Python I might just do the whole project in Python (I would rather not). This is the zfec library.

Any hints on a Java library?


Solution

  • Finally, I have decided to go with a Java implementation of the FEC.

    It is based on onion networks FEC library.

    I developed a wrapper for that library that hopefully makes it easier to use for what I need. It has Junit tests and a simpler API for creating the chunks from a File or from a byte array.

    Take a look here if you are interested, it is a public repository in bitbucket.