def compress_cidr_list(cidrList):
    """
    return cidr list after compressed and ipCount
    """
    cidrHash = {}
    compressedCidrList = []
    ipCount = 0
    for cidr in cidrList:
        ip, prefix = cidr.strip().split('/')
        if not cidrHash.has_key(prefix):
            cidrHash[prefix] = []
        cidrHash[prefix].append(cidr)
    from IPy import IP, IPSet
    for prefix, cidrList in cidrHash.items():
        ipSetList = []
        for cidr in cidrList:
            ipSetList.append(IP(cidr, make_net=1))
        ipSet = IPSet(ipSetList)
        for compressdCidr in ipSet:
            compressedCidrList.append(str(compressdCidr))
            ipCount = ipCount + compressdCidr.len()
    return compressedCidrList, ipCount
