我有以下奇怪的问题,而试图读取和蟒蛇解开INT32 +的Int64 2.7.9拆包INT +长长的蟒蛇
file = open('my_file.bin','rb')
s = file.read(4 + 8)
struct.unpack('IQ',s)
我得到以下错误: 解压需要的字符串参数长度16
这是为什么? I = 4 Q = 8 IQ = 12
顺便说一句以下工作:
s = file.read(4)
struct.unpack('I',s)
s = file.read(8)
struct.unpack('Q',s)
我想这两个解压然后完成8 * 8 = int64,可以吗? –