"""Dump body bytes split into 32-byte rows starting from `start_offset`.""" import sys sys.path.insert(0, ".") from analysis.load_bundle import load_bundle def dump(body: bytes, name: str, start: int, n_rows: int = 30): print(f"\n=== {name} body[{start}:] (full body={len(body)}) ===") end = min(start + 32 * n_rows, len(body)) for i in range(start, end, 32): row = body[i:i+32] print(f" +{i:>5} {row.hex(' ')}") def main(): for name in ("event-a", "event-b", "event-c", "event-d"): b = load_bundle(name) # Print the LAST ~600 bytes of the body to see the tail structure start = max(0, len(b.body) - 32 * 12) dump(b.body, name, start, 12) if __name__ == "__main__": main()