Reed Solomon Java Library - Partitioning files wit

2019-08-28 20:50发布

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?

2条回答
一纸荒年 Trace。
2楼-- · 2019-08-28 21:17

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.

查看更多
迷人小祖宗
3楼-- · 2019-08-28 21:22

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.

查看更多
登录 后发表回答