import struct with open("channels.bin", "br") as f: while True: blob = f.read(4) data = struct.unpack("