protected function compress(string $row, ?string $lastRow): string
    {
        if ($row === $lastRow) {
            return ':';
        }

        $row = $this->compressTrailingZerosOrOnes($row);
        $row = $this->compressRepeatingCharacters($row);

        return $row;
    }