A computer-implemented method for correcting transmission errors, comprising the steps of: transmitting a vector using a linear code, said vector becoming corrupted by error upon transmission; and recovering the vector by solving a linear program in form of a convex optimization problem minx???Rn??????y-Ax???l1, wherein y is the corrupted vector, A is a coding matrix expressing the linear code, an