import sys import struct with open(sys.argv[1], 'rb') as f: buf = f.read() mem = memoryview(buf) for i in range(len(mem) // 2): n, = struct.unpack("