thod is basically verbatim from "huBarcode" which is BSD licensed
        https://github.com/hudora/huBarcode/blob/master/hubarcode/datamatrix/reedsolomon.py
        r