0

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?

Cacho Santa
  • 6,846
  • 6
  • 41
  • 73
  • thanks for the downvote, and specially for the proper explanation. – Cacho Santa Feb 17 '14 at 00:16
  • The downvote was most likely because you're asking for recommended tools / libraries, which is considered off-topic for stackoverflow. As it [states in the help center](http://stackoverflow.com/help/on-topic): *Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.* – Paul Richter Feb 25 '14 at 04:51
  • Thank you very much @PaulRichter for the explanation. I don't think this is a "What's your favorite....?" subjective question, I have described the problem and mentioned everything I have found on the web.... Like [this](http://meta.stackexchange.com/questions/139399/what-exactly-is-a-recommendation-question#) question on meta.stackoverflow..... Now that I have solved it, I think this question + answers could be very helpful to developers that have the same needs that I do.... What do you think? I can delete the question, there is no problem in that, but I don't think is the right thing to do. – Cacho Santa Feb 25 '14 at 05:06
  • 1
    I would say its more the "recommend a tool" part, than the "favourite" part, but either way its basically a guideline to help avoid non-specific, or highly varied answers. Speaking in general (I know, the irony...), its the kind of question where users might post tons of recommendations and incite huge off-topic debates. Now, in your case, something like the Reed-solomon is more specific than "something to format dates" (as a cheesy example), but as you probably saw, it looks like you found at least a couple of different options. [continued...] – Paul Richter Feb 25 '14 at 05:18
  • 1
    I would say keep the question and answers (don't delete) as I agree it might indeed be helpful to other users. Just watch out when making questions like this. Stackoverflow is usually much better suited for questions such as "How do I do this [feature]? I have this [code], and it fails because of [reasons]." As Shog9 said in one of the answers in the link you posted: *Ask how, not what...just ask how you should do what you want to do, and leave the library recommendations - if any - to the answerers.* – Paul Richter Feb 25 '14 at 05:22
  • 2
    Thanks again @PaulRichter, I understand your point, it makes sense... I'll be more careful with my future questions... Thanks! – Cacho Santa Feb 25 '14 at 05:40

2 Answers2

0

I decided to use zfec library, it is extremely easy to use, no need to even read anything. All you need is zfec --help and you're done.

In order to communicate with Java I'm considering two possibilities:

  1. Create a JNI.

  2. Create a small local HTTP service in python as a wrapper of the zfec library. Probably with something like Flask.

Cacho Santa
  • 6,846
  • 6
  • 41
  • 73
0

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.

Cacho Santa
  • 6,846
  • 6
  • 41
  • 73