'Return a string representation in compressed format using \'::\' Notation.
>>> IP(\'127.0.0.1\').strCompressed()
\'127.0.0.1\'
>>> IP(\'2001:0658:022a:cafe:0200::1\').strCompressed()
\'2001:658:22a:cafe:200::1\'
>>> IP(\'ffff:ffff:ffff:ffff:ffff:f:f:fffc/127\').strCompressed()
\'ffff:ffff:ffff:ffff:ffff:f:f:fffc/127\''

def strCompressed(self, wantprefixlen=None):

    if ((self.WantPrefixLen == None) and (wantprefixlen == None)):
        wantprefixlen = 1
    if (self._ipversion == 4):
        return self.strFullsize(wantprefixlen)
    else:
        if ((self.ip >> 32) == 65535):
            ipv4 = intToIp((self.ip & MAX_IPV4_ADDRESS), 4)
            text = (('::ffff:' + ipv4) + self._printPrefix(wantprefixlen))
            return text
        hextets = [int(x, 16) for x in self.strFullsize(0).split(':')]
        followingzeros = ([0] * 8)
        for i in xrange(len(hextets)):
            followingzeros[i] = _countFollowingZeros(hextets[i:])
        compressionpos = followingzeros.index(max(followingzeros))
        if (max(followingzeros) > 1):
            hextets = [x for x in self.strNormal(0).split(':')]
            while ((compressionpos < len(hextets)) and (hextets[compressionpos] == '0')):
                del hextets[compressionpos]
            hextets.insert(compressionpos, '')
            if ((compressionpos + 1) >= len(hextets)):
                hextets.append('')
            if (compressionpos == 0):
                hextets = ([''] + hextets)
            return (':'.join(hextets) + self._printPrefix(wantprefixlen))
        else:
            return (self.strNormal(0) + self._printPrefix(wantprefixlen))
