Closed vrancurel closed 5 years ago
@slaperche-scality can you make a suggestion of an API and we will iterate over it ?
void init(int k, int m);
void destroy();
int encode(char **data, char **parity, uint32_t block_size);
int decode(char **data, char **parity, int *missing_idxs, int block_size);
int fragsneeded(int *missing_idxs, int *fragments_to_exclude, int *fragments_needed);
int reconstruct(char **data, char **parity, int *missing_idxs, int destination_idx, int block_size);
Some remarks and questions @lamphamsy and @slaperche-scality
Use a codec style API:
The lib shall split the buffers acc/to the parameters of the code (type of code, k, m, stride, word_size, etc)