def gzipcrc32(filename):
datafile = open(filename, 'rb')
datafile.seek(0)
databuffer = datafile.read(10000000)
crc32 = binascii.crc32('')
while databuffer != '':
crc32 = binascii.crc32(databuffer, crc32)
databuffer = datafile.read(10000000)
datafile.close()
crc32 = crc32 & 0xffffffff
return crc32
评论列表
文章目录