Skip to main content

Module encode

Module encode 

Source
Expand description

The Coder: encode, incremental update, verify, and recover — ISA-L’s ec_encode_data / ec_encode_data_update semantics plus the recovery flow ISA-L leaves as an exercise, all behind validated, panic-free APIs.

Conformance: encode and update are byte-identical to ISA-L’s _base implementations (golden-vector gated); a completed update sequence is byte-identical to one-shot encode; recover is gated against ground truth (the original shards ARE the expected output).

Structs§

Coder
An erasure coder for one (matrix) configuration: k source shards in, p parity shards out, recovery from any k survivors.
DecodePlan
A prepared decode: the survivor selection, inverted submatrix (composed into per-target coefficient rows), and expanded tables for ONE loss pattern — reusable across every stripe sharing that pattern. Built by Coder::decode_plan, consumed by Coder::recover_with.