I'm writing a go-wrapper for this implementation; BTW the C wrapper makes that really convenient, thanks for that!
I struggle to completely understand the API though. What I'm trying to do is quite basic: given n original data buffers or symbols, I want to generate n "parity symbols" s.t. that I can loose any n (of the now 2*n total) symbols and still recover the data.
I mainly experimented with the API in banchmarks.cpp: OK, sounds like I would need to call leo_encode with original_count == recovery_count for that, right? leo_encode_work_count returns 2*original_count for these params and calling leo_encode yields encode_work_data with the size 2*original_count as expected. So far so good. What is surprising though: I would have expected encode_work_data to contain the original data too instead it does seem to contain 2*original_count recovery or parity symbols. So is there no way I can achieve what described above using the public C API or am I using recovery_count wrong?
Thanks in advance :-)
I'm writing a go-wrapper for this implementation; BTW the C wrapper makes that really convenient, thanks for that!
I struggle to completely understand the API though. What I'm trying to do is quite basic: given
noriginal data buffers or symbols, I want to generaten"parity symbols" s.t. that I can loose anyn(of the now2*ntotal) symbols and still recover the data.I mainly experimented with the API in banchmarks.cpp: OK, sounds like I would need to call
leo_encodewithoriginal_count == recovery_countfor that, right?leo_encode_work_countreturns2*original_countfor these params and callingleo_encodeyieldsencode_work_datawith the size2*original_countas expected. So far so good. What is surprising though: I would have expectedencode_work_datato contain the original data too instead it does seem to contain2*original_countrecovery or parity symbols. So is there no way I can achieve what described above using the public C API or am I using recovery_count wrong?Thanks in advance :-)