예제 #1
0
파일: str.py 프로젝트: hansihe/pymcprotocol
 def decode(self, field, buf):
     byte_count, str_length = varint_util.decode_varint(buf)
     buf = buf[byte_count:]
     val = buf[:str_length].decode("utf-8")
     buf = buf[str_length:]
     return buf, val
예제 #2
0
 def decode(self, field, buf):
     byte_count, var = varint_util.decode_varint(buf)
     buf = buf[byte_count:]
     return buf, var