shiftAndAppend method

State shiftAndAppend(
  1. int mode,
  2. int value
)

Implementation

State shiftAndAppend(int mode, int value) {
  //assert binaryShiftByteCount == 0 && this.mode != mode;
  Token token = _token;
  final int thisModeBitCount = _mode == HighLevelEncoder.MODE_DIGIT ? 4 : 5;
  // Shifts exist only to UPPER and PUNCT, both with tokens size 5.
  token =
      token.add(HighLevelEncoder.shiftTable[_mode][mode], thisModeBitCount);
  token = token.add(value, 5);
  return State(token, _mode, 0, _bitCount + thisModeBitCount + 5);
}