public function addBinaryShiftChar($index) { $token = $this->token; $mode = $this->mode; $bitCount = $this->bitCount; if ($this->mode == DynamicDataEncoder::MODE_PUNCT || $this->mode == DynamicDataEncoder::MODE_DIGIT) { $latch = DynamicDataEncoder::getLatch($mode, DynamicDataEncoder::MODE_UPPER); $token = $token->add($latch & 0xffff, $latch >> 16); $bitCount += $latch >> 16; $mode = DynamicDataEncoder::MODE_UPPER; } if ($this->shiftByteCount == 0 || $this->shiftByteCount == 31) { $deltaBitCount = 18; } elseif ($this->shiftByteCount == 62) { $deltaBitCount = 9; } else { $deltaBitCount = 8; } $result = new self($token, $mode, $this->shiftByteCount + 1, $bitCount + $deltaBitCount); if ($result->getBinaryShiftByteCount() == 2047 + 31) { $result = $result->endBinaryShift($index + 1); } return $result; }