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.
{
    extern const char one_byte_to_string_lookup_table[256][4];
    const size_t mask_length = mask_string ? strlen(mask_string) : 0;
    const size_t limit = std::min(IPV4_BINARY_LENGTH, IPV4_BINARY_LENGTH - mask_tail_octets);
    for (size_t octet = 0; octet < limit; ++octet)
    {
        const uint8_t value = static_cast<uint8_t>(src[IPV4_BINARY_LENGTH - octet - 1]);
        const auto * rep = one_byte_to_string_lookup_table[value];
        const uint8_t len = rep[0];
        const char* str = rep + 1;
        memcpy(dst, str, len);
        dst += len;
        *dst++ = '.';
    }
    for (size_t mask = 0; mask < mask_tail_octets; ++mask)
    {
        memcpy(dst, mask_string, mask_length);
        dst += mask_length;
        *dst++ = '.';
    }
    dst[-1] = '\0';
}
}