Canonicalize an IPv6 address by removing redundant zeroes and groups.
Eight 16-bit groups are parsed, leading zeroes are removed, and the longest zero run becomes ::; letters are lowercased. Equal-length runs choose the leftmost under RFC 5952.
2001:0db8:0000:0000:0000:0000:0000:0001
Input: 2001:0db8:0000:0000:0000:0000:0000:0001 Compressed: 2001:db8::1 Expanded: 2001:0db8:0000:0000:0000:0000:0000:0001
Logs, endpoint configs, and firewall allowlists canonicalize IPv6 text.