

def getMP(data, count=1):
    '\n    Get multiple precision integer out of the string.  A multiple precision\n    integer is stored as a 4-byte length followed by length bytes of the\n    integer.  If count is specified, get count integers out of the string.\n    The return value is a tuple of count integers followed by the rest of\n    the data.\n    '
    mp = []
    c = 0
    for i in range(count):
        (length,) = struct.unpack('>L', data[c:(c + 4)])
        mp.append(Util.number.bytes_to_long(data[(c + 4):((c + 4) + length)]))
        c += (4 + length)
    return (tuple(mp) + (data[c:],))

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/conch/ssh/common.py getMP/original