QR code implements the Reed-Solomon error correction algorithm
that divides a QR code into several disjoint RS blocks and perform
the error correction on individual block. Each RS block consists of
codewords and each codeword contains eight data modules. Codeword
is the basic unit in error correction, and is considered as erroneous
and needed to be restored if one of its eight data modules is
decoded incorrectly. QR code specification defines four error correction
levels, which are L(7%), M(15%), Q(25%), and H(30%),
where the number indicates the percentage of codewords that can
be restored in each RS block. Therefore, it is easy to calculate the
error correction capacity (ECC) of RS blocks in a QR code given a
specific setting of symbol version and error correction level.