"""That's basically packetHelper.py from pep.py, with some changes to make it work with replay files.""" from constants import dataTypes import struct def uleb128Encode(num): arr = bytearray() length = 0 if num == 0: return bytearray(b"\x00") while num > 0: arr.append(num & 127) num >>= 7 if num != 0: arr[length] |= 128 length+=1 return arr def packData(__data, __dataType): data = bytes() pack = True packType = "