The CIRC code

The encoding procedure

  1. The information to encode is split into blocks of 24 bytes.
    x0 = (x0,0,x0,1,...,x0,23)
    x1 = (x1,0,x1,1,...,x1,23)
      ...
    xi = (xi,0,xi,1,...,xi,23)
      ...
  2. Each block xi is encoded using C1 in as many blocks yi of 28 bytes (of course we have yi,j=xi,j for every j<24)
    y0 = (y0,0,y0,1,...,y0,23,y0,24,y0,25,y0,26,y0,27)
    y1 = (y1,0,y1,1,...,y1,23,y1,24,y1,25,y1,26,y1,27)
      ...
    yi = (yi,0,yi,1,...,yi,23,yi,24,yi,25,yi,26,yi,27)
      ...
  3. The yi are placed in an interleaving table with delay of 4 (and with 28 rows): meaning that the byte yi,j is located on the j-th row and the the (i+4j)-th column.

    The filling of the table in the undertermined places (under the fist codeword, and abov the last one) will be done arbitrarily, for exemple filling with zeros.
  4. Four lines are added to the table by coding each column with the code C2.
  5. The result is written on the output by reading columnwise.

Decoding procedure

  1. The data is read by blocks of 32 bytes and stored columnwise.
  2. One tries to fix 1 error in each column using the decoder of C2. In case of failure, the column is marked as erased.
  3. The output is a table of 28 rows of bytes -- with some columns, marked as erased -- from which one exctracts blocks of 28 bytes (see figures and coding procedure). Every block counting less than 4 erasures will be corrected using the decoder of C1. If more than 5 erasures occured in one block, nothing can be done.