Skip to content

Comparing Encoding/Decoding with another erasure coding library #282

Discussion options

You must be logged in to vote

hi @klauspost ,

Thank you for this hint. I looked carefully at the encoding matrix:
zfec vs klauspost/reedsolomon

And, yes, after a while staring at the code, it is pretty obvious that zfec is not generating its encoding matrix from a vandermonde matrix:

  • zfec does not fill the last row of the matrix (that one really bothers me)
  • zfec is not calculating alphai^j but something like alphai^i^j . I am not entirely sure I understand what it is calculating but I know for sure that it is not the corresponding vandermonde coefficient.

The patch below fixes both issues and appears to generate the same matrix you use in reedsolomon.go. Encoding and decoding then works cross-library. I doubt this i…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@klauspost
Comment options

@hivenet-mathieu-lacage
Comment options

@hivenet-mathieu-lacage
Comment options

@klauspost
Comment options

Answer selected by klauspost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants