1. A method for decoding encoded data, comprising source data and redundancy data, said redundancy data being obtained by the application to said source data, when encoding, of a primal error-correcting code which can be represented by a generating matrix comprising, in its systematic form, an identity matrix and an invertible matrix for switching from source data to redundancy data, wherein said method comprises: receiving, by a decoding device, a packet or a stream comprising the encoded data from a wired or wireless transmission channel, the encoded data being susceptible to transmission errors in the transmission channel; decoding the encoded data by the decoding device to generate an estimate of corrected source data, wherein decoding comprises: the decoding device implementing a primal-dual error correcting code in an integrated circuit or in a microprocessor electronic component executing instructions, the primal-dual error correcting code simultaneously implementing said primal error-correcting code and a dual error correcting code that is the dual of the primal error-correcting code, wherein the primal-dual error correcting code is configured to represent a modified Tanner graph, called a primal-dual Tanner graph, that is a superposition of a primal Tanner graph corresponding to the primal error-correcting code and a dual Tanner graph corresponding to the dual error-correcting code, said superimposition comprising a two-by-two connection of input variables of said primal Tanner graph with input variables of said dual Tanner graph corresponding to the same source data and a two-by-two connection of output variables of the primal Tanner graph with output variables of said dual Tanner graph corresponding to the same redundancy data, the input and output variables of the primal-dual Tanner graph corresponding to input and output variables of the primal-dual error correcting code; the decoding device applying the source data and the redundancy data of the received encoded data that is susceptible to transmission errors to the input variables and the output variables, respectively, of the primal-dual error-correcting code; the decoding device processing the input variables and output variables according to the primal-dual error correcting code to produce the estimate of the corrected source data.