The performance of Gallager's error-correcting code is investigated via methods of statistical physics. In this approach, the transmitted codeword comprises products of the original message bits selected by two randomly-constructed sparse matrices; the number of non-zero row/column elements in these matrices constitutes a family of codes. We show that Shannon's channel capacity is saturated for many of the codes while slightly lower performance is obtained for others which may be of higher practical relevance. Decoding aspects are considered by employing the TAP approach which is identical to the commonly used belief-propagation-based decoding.The ever increasing information transmission in the modern world is based on communicating messages reliably through noisy transmission channels; these can be telephone lines, deep space, magnetic storing media etc. Errorcorrecting codes play an important role in correcting errors incurred during transmission; this is carried out by encoding the message prior to transmission, and decoding the corrupted received codeword for retrieving the original message. In his ground breaking papers, Shannon [1] analyzed the capacity of communication channels, setting an upper bound to the achievable noise-correction capability of codes, given their code (or symbol) rate. The latter represents the ratio between the number of bits in the original message and the transmitted codeword.Shannon's bound is non-constructive and does not provide explicit rules for devising optimal codes. The quest for more efficient codes, in the hope of saturating the bound set by Shannon, has been going on ever since, providing many useful but sub-optimal codes.One family of codes, presented originally by Gallager In this Letter we analyze the typical performance of Gallager-type codes for several parameter choices via methods of statistical mechanics. We then validate the analytical solution by comparing the results to those obtained by the TAP approach to diluted systems and via numerical methods.In a general scenario, a message represented by an N dimensional Boolean/binary vector ξ is encoded to the M dimensional vector J 0 which is then transmitted through a noisy channel with some flipping probability p per bit (other noise types may also be considered but will not be examined here). The received message J is then decoded to retrieve the original message.One can identify several slightly different versions of Gallager-type codes. The one used in this Letter, termed the MN code [3] is based on choosing two randomly-selected sparse matrices A and B of dimensionality M×N and M×M respectively; these are characterized by K and L non-zero unit elements per row and C and L per column respectively. The finite, usually small, numbers K, C and L define a particular code; both matrices are known to both sender and receiver. Encoding is carried out by constructing the modulo 2 inverse of B and the matrix B −1 A (modulo 2); the vector J 0 = B −1 A ξ (modulo 2, ξ in a Boolean representation) constitutes the codeword....