code: function appendData(data, dataLength, ecc, eccLength) {
      var bit, i, j;
  
      for (i = 0; i < eccLength; i++) {
        stringBuffer[ecc + i] = 0;
      }
  
      for (i = 0; i < dataLength; i++) {
        bit = GALOIS_LOG[stringBuffer[data + i] ^ stringBuffer[ecc]];
  
        if (bit !== 255) {
          for (j = 1; j < eccLength; j++) {
            stringBuffer[ecc + j - 1] = stringBuffer[ecc + j] ^
                GALOIS_EXPONENT[modN(bit + polynomial[eccLength - j])];
          }
        } else {
          for (j = ecc; j < ecc + eccLength; j++) {
            stringBuffer[j] = stringBuffer[j + 1];
          }
        }
  
        stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 :
            GALOIS_EXPONENT[modN(bit + polynomial[0])];
      }
    }
docs: Calculate and append `ecc` data to the `data` block. If block is in the string buffer the indices to buffers are used.