Conversion to or from non-linear codes