Reed Solomon Java Library - Partitioning files with redundancy [closed]

一笑奈何 提交于 2019-12-12 02:26:51

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/21818211/reed-solomon-java-library-partitioning-files-with-redundancy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!