protected function copyUntil($string) {
        $newPosition = $this->find($string);
        $this->compressedCode .= substr($this->code, $this->currentPosition, $newPosition - $this->currentPosition);
        $this->currentPosition = $newPosition;
    }