def read_packet_message(): try: kind = read_varint(stream) size = read_varint(stream) tell = stream.tell() stream.seek(tell + size) except EOFError, e: return None
def read_demo_message(): try: kind = read_varint(stream) tick = read_varint(stream) size = read_varint(stream) comp = pb_d.DEM_IsCompressed & kind kind = (kind ^ pb_d.DEM_IsCompressed) if comp else kind tell = stream.tell() stream.seek(tell + size) except EOFError, e: return None