-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reed solomon erasure code #225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API doc could be improved but otherwise ok for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple more questions
Now that I've had a chance to think about this PR wrt the VID use case: The level of abstraction here is too high. Encoding/decoding should not automatically split/recombine data into chunks of length I have a good idea of the API I want. Let's chat next week. |
Ready for review @mrain @chancharles92 . TODO/Questions:
|
Current erasure code API looks like this: fn encode(&self, data: &[F])
fn decode(&self, shards: &[Self::Shard]) where data size and codeword size are implicit and set by the constructor Problem: This API is stateful. Also, there's nothing to stop a user from taking shards from one erasure code and passing them to another (with different data and codeword sizes), so we don't get much argument safety anyway. Proposal: make fn encode(codeword_size: usize, data: &[F]) // data size is data.len()
fn decode(data_size: usize, shards: &[Self::Shard]) // need data_size <= shards.len() @mrain @chancharles92 any opinions? |
Description
closes: #215
A very naive implementation of Reed Solomon erasure code.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Pending
section inCHANGELOG.md
Files changed
in the GitHub PR explorer