示例#1
0
文件: decoder.py 项目: key50/My_kRPC
 def decode_sint64(cls, data):
     return protobuf_wire_format.ZigZagDecode(
         cls._decode_signed_varint(data))
示例#2
0
def decode_svarint(buf, pos):
    """Decode bytearray into a long."""
    output, pos = decode_uvarint(buf, pos)
    # zigzag encode value
    return wire_format.ZigZagDecode(output), pos
示例#3
0
 def ReadSInt32(self):
     """Reads and returns a signed, zigzag-encoded, varint-encoded,
 32-bit integer."""
     return wire_format.ZigZagDecode(self._stream.ReadVarUInt32())