pub fn rs_encode(data: &[u8]) -> Vec<u8> ⓘExpand description
RS-encode a single data block (systematic encoding).
§Arguments
data: Data bytes of length <=K_DEFAULT(191).
§Returns
A vector of data.len() + PARITY_LEN bytes: the original data followed
by 64 parity symbols.
§Panics
Panics if data.len() > K_DEFAULT.
For shortened codes (data.len() < K_DEFAULT), the data is conceptually
zero-padded at the front to K_DEFAULT, encoded, then the padding is removed.
The parity symbols are computed over this virtual full-length block.