  In this paper, a lemma in algebraic coding theory is established, which is
frequently appeared in the encoding and decoding for algebraic codes such as
Reed-Solomon codes and algebraic geometry codes. This lemma states that two
vector spaces, one corresponds to information symbols and the other is indexed
by the support of Grobner basis, are canonically isomorphic, and moreover, the
isomorphism is given by the extension through linear feedback shift registers
from Grobner basis and discrete Fourier transforms. Next, the lemma is applied
to fast unified system of encoding and decoding erasures and errors in a
certain class of affine variety codes.
