tahoe-lafs / zfec

zfec -- an efficient, portable erasure coding tool
Other
373 stars 44 forks source link

Allow control over how the encoding matrix is built #110

Open hivenet-mathieu-lacage opened 1 week ago

hivenet-mathieu-lacage commented 1 week ago

Allow users to pick an encoding matrix that is compatible with the klauspost/reedsolomon library.

The zfec library uses a vector of alpha^i to create its encoding matrix from the vandermonde matrix. From the original paper: https://www.cs.utexas.edu/users/lam/395t/papers/FEC-rizzo.pdf

Screenshot 2024-06-18 at 06-38-02 FEC-rizzo pdf

Some libraries use another common convention where the encoding matrix is built from the vandermonde matrix from a vector of sequential integers (0, 1, 2, 3, ...). The objective of this patch is to allow zfec to generate and consume data using this convention.