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.
#pragma once
#include <base/types.h>
#include <string.h>
#include <algorithm>
#include <utility>
#include <base/range.h>
#include <Common/hex.h>
#include <Common/StringUtils/StringUtils.h>
constexpr size_t IPV4_BINARY_LENGTH = 4;
constexpr size_t IPV6_BINARY_LENGTH = 16;
constexpr size_t IPV4_MAX_TEXT_LENGTH = 15;     
constexpr size_t IPV6_MAX_TEXT_LENGTH = 39;
namespace DB
{
/** Rewritten inet_ntop6 from http://svn.apache.org/repos/asf/apr/apr/trunk/network_io/unix/inet_pton.c
  *  performs significantly faster than the reference implementation due to the absence of sprintf calls,
  *  bounds checking, unnecessary string copying and length calculation.
  */
void formatIPv6(const unsigned char * src, char *& dst, uint8_t zeroed_tail_bytes_count = 0);
/** Unsafe (no bounds-checking for src nor dst), optimized version of parsing IPv4 string.
 *