Algorithm-FEC
view release on metacpan or search on metacpan
necessary) to reflect the order the blocks will have in the decoded
result.
The index array represents the decoded ordering, in that the n-th entry
in the indices array corresponds to the n-th data block of the decoded
result. The value stored in the n-th place in the array will contain the
index of the encoded data block.
Input blocks with indices less than C<data_blocks> will be moved to their
final position (block k to position k), while the gaps between them will
be filled with check blocks. The decoding process will not modify the
already decoded data blocks, but will modify the check blocks.
That is, if you call this function with C<indices = [4,3,1]>, with
C<data_blocks = 3>, then this array will be returned: C<[0,2,1]>. This
means that input block C<0> corresponds to file block C<0>, input block
C<1> to file block C<2> and input block C<2> to data block C<1>.
You can just iterate over this array and write out the corresponding data
block (although this is inefficient):
necessary) to reflect the order the blocks will have in the decoded
result.
The index array represents the decoded ordering, in that the n-th
entry in the indices array corresponds to the n-th data block of the
decoded result. The value stored in the n-th place in the array will
contain the index of the encoded data block.
Input blocks with indices less than "data_blocks" will be moved to
their final position (block k to position k), while the gaps between
them will be filled with check blocks. The decoding process will not
modify the already decoded data blocks, but will modify the check
blocks.
That is, if you call this function with "indices = [4,3,1]", with
"data_blocks = 3", then this array will be returned: "[0,2,1]". This
means that input block 0 corresponds to file block 0, input block 1
to file block 2 and input block 2 to data block 1.
You can just iterate over this array and write out the corresponding
data block (although this is inefficient):
( run in 0.244 second using v1.01-cache-2.11-cpan-8d75d55dd25 )