import ipaddress
import re


def uncompress(addr):
    """Return the uncompressed form of an address, adding leading zeroes
    """
    ip = ipaddress.ip_interface(addr)
    version = re.sub("Interface", "", ip.__class__.__name__)
    if version == "IPv4":
        return ".".join(map(lambda x: "%03d" % int(x), str(ip.ip).split(".")))
    if version == "IPv6":
        return ip.ip.exploded