deps/encoding/encoding.js
function EUCKRDecoder(options) {
  var fatal = options.fatal;
  var /** @type {number} */ euckr_lead = 0x00;
  /**
   * @param {ByteInputStream} byte_pointer The byte stream to decode.
   * @return {?number} The next code point decoded, or null if not enough
   *     data exists in the input stream to decode a complete code point.
   */
  this.decode = function(byte_pointer) {
    var bite = byte_pointer.get();
    if (bite === EOF_byte && euckr_lead === 0) {
      return EOF_code_point;
    }
    if (bite === EOF_byte && euckr_lead !== 0) {
      euckr_lead = 0x00;
      return decoderError(fatal);
    }
    byte_pointer.offset(1);
    if (euckr_lead !== 0x00) {
      var lead = euckr_lead;
      var pointer = null;
      euckr_lead = 0x00;

      if (inRange(lead, 0x81, 0xC6)) {
        var temp = (26 + 26 + 126) * (lead - 0x81);
        if (inRange(bite, 0x41, 0x5A)) {
          pointer = temp + bite - 0x41;
        } else if (inRange(bite, 0x61, 0x7A)) {
          pointer = temp + 26 + bite - 0x61;
        } else if (inRange(bite, 0x81, 0xFE)) {
          pointer = temp + 26 + 26 + bite - 0x81;
        }
      }

      if (inRange(lead, 0xC7, 0xFD) && inRange(bite, 0xA1, 0xFE)) {
        pointer = (26 + 26 + 126) * (0xC7 - 0x81) + (lead - 0xC7) * 94 +
            (bite - 0xA1);
      }

      var code_point = (pointer === null) ? null :
          indexCodePointFor(pointer, indexes['euc-kr']);
      if (pointer === null) {
        byte_pointer.offset(-1);
      }
      if (code_point === null) {
        return decoderError(fatal);
      }
      return code_point;
    }

    if (inRange(bite, 0x00, 0x7F)) {
      return bite;
    }

    if (inRange(bite, 0x81, 0xFD)) {
      euckr_lead = bite;
      return null;
    }

    return decoderError(fatal);
  };
}
function EUCKRDecoder(options) {
  var fatal = options.fatal;
  var /** @type {number} */ euckr_lead = 0x00;
  /**
   * @param {ByteInputStream} byte_pointer The byte stream to decode.
   * @return {?number} The next code point decoded, or null if not enough
   *     data exists in the input stream to decode a complete code point.
   */
  this.decode = function(byte_pointer) {
    var bite = byte_pointer.get();
    if (bite === EOF_byte && euckr_lead === 0) {
      return EOF_code_point;
    }
    if (bite === EOF_byte && euckr_lead !== 0) {
      euckr_lead = 0x00;
      return decoderError(fatal);
    }
    byte_pointer.offset(1);
    if (euckr_lead !== 0x00) {
      var lead = euckr_lead;
      var pointer = null;
      euckr_lead = 0x00;

      if (inRange(lead, 0x81, 0xC6)) {
        var temp = (26 + 26 + 126) * (lead - 0x81);
        if (inRange(bite, 0x41, 0x5A)) {
          pointer = temp + bite - 0x41;
        } else if (inRange(bite, 0x61, 0x7A)) {
          pointer = temp + 26 + bite - 0x61;
        } else if (inRange(bite, 0x81, 0xFE)) {
          pointer = temp + 26 + 26 + bite - 0x81;
        }
      }

      if (inRange(lead, 0xC7, 0xFD) && inRange(bite, 0xA1, 0xFE)) {
        pointer = (26 + 26 + 126) * (0xC7 - 0x81) + (lead - 0xC7) * 94 +
            (bite - 0xA1);
      }

      var code_point = (pointer === null) ? null :
          indexCodePointFor(pointer, indexes['euc-kr']);
      if (pointer === null) {
        byte_pointer.offset(-1);
      }
      if (code_point === null) {
        return decoderError(fatal);
      }
      return code_point;
    }

    if (inRange(bite, 0x00, 0x7F)) {
      return bite;
    }

    if (inRange(bite, 0x81, 0xFD)) {
      euckr_lead = bite;
      return null;
    }

    return decoderError(fatal);
  };
}
function EUCKRDecoder ( options ) { var fatal = options . fatal ; var /** @type {number} */ euckr_lead = 0x00 ; /**
   * @param {ByteInputStream} byte_pointer The byte stream to decode.
   * @return {?number} The next code point decoded, or null if not enough
   *     data exists in the input stream to decode a complete code point.
   */ this . decode = function ( byte_pointer ) { var bite = byte_pointer . get ( ) ; if ( bite === EOF_byte && euckr_lead === 0 ) { return EOF_code_point ; } if ( bite === EOF_byte && euckr_lead !== 0 ) { euckr_lead = 0x00 ; return decoderError ( fatal ) ; } byte_pointer . offset ( 1 ) ; if ( euckr_lead !== 0x00 ) { var lead = euckr_lead ; var pointer = null ; euckr_lead = 0x00 ; if ( inRange ( lead , 0x81 , 0xC6 ) ) { var temp = ( 26 + 26 + 126 ) * ( lead - 0x81 ) ; if ( inRange ( bite , 0x41 , 0x5A ) ) { pointer = temp + bite - 0x41 ; } else if ( inRange ( bite , 0x61 , 0x7A ) ) { pointer = temp + 26 + bite - 0x61 ; } else if ( inRange ( bite , 0x81 , 0xFE ) ) { pointer = temp + 26 + 26 + bite - 0x81 ; } } if ( inRange ( lead , 0xC7 , 0xFD ) && inRange ( bite , 0xA1 , 0xFE ) ) { pointer = ( 26 + 26 + 126 ) * ( 0xC7 - 0x81 ) + ( lead - 0xC7 ) * 94 + ( bite - 0xA1 ) ; } var code_point = ( pointer === null ) ? null : indexCodePointFor ( pointer , indexes [ 'euc-kr' ] ) ; if ( pointer === null ) { byte_pointer . offset ( - 1 ) ; } if ( code_point === null ) { return decoderError ( fatal ) ; } return code_point ; } if ( inRange ( bite , 0x00 , 0x7F ) ) { return bite ; } if ( inRange ( bite , 0x81 , 0xFD ) ) { euckr_lead = bite ; return null ; } return decoderError ( fatal ) ; } ; }
13.1 euc-kr 
@constructor
@param {{fatal: boolean}} options
13 . 1 euc - kr