import sys, struct def read_e2store(name): with open(name, "rb") as f: header = f.read(8) typ = header[0:2] # First 2 bytes for type if typ != b"e2": raise RuntimeError("this is not an e2store file") while True: header = f.read(8) # Header is 8 bytes if not header: break typ = header[0:2] # First 2 bytes for type dlen = struct.unpack("