https://github.com/ClickHouse/ClickHouse/blob/289a51b61d636e9b2ac98dc912d4d1894cc31e2e/src/Common/formatIPv6.h#L14

According to this [link](https://stackoverflow.com/questions/166132/maximum-length-of-the-textual-representation-of-an-ipv6-address), the Maxiumn length of IPv6 textual representation should be 45.
UInt32 val{};
    unsigned char * colonp = nullptr;
    
    while (char ch = *src++)
    {
        UInt8 num = unhex(ch);
        if (num != 0xFF)
        {
            val <<= 4;
            val |= num;
            if (val > 0xffffu)
                return clear_dst();
            saw_xdigit = true;
            continue;
        }
        if (ch == ':')
        {
            curtok = src;
            if (!saw_xdigit)
            {
                if (colonp)
                    return clear_dst();
                colonp = tp;
                continue;
            }
            if (tp + sizeof(UInt16) > endp)
                return clear_dst();
            *tp++ = static_cast<unsigned char>((val >> 8) & 0xffu);
            *tp++ = static_cast<unsigned char>(val & 0xffu);
            saw_xdigit = false;