Function datamatrix::errorcode::encode[][src]

pub fn encode(data: &[u8], size: SymbolSize) -> Vec<u8>

Compute the Reed-Solomon code used by DataMatrix for error correction.

Depending on the symbol size, the data is first split up into interleaved blocks. For each block an error code is computed. Those codes are returned consecutively, i.e., not interleaved.