Exemple #1
0
 def decode_sint64(cls, data):
     return protobuf_wire_format.ZigZagDecode(
         cls._decode_signed_varint(data))
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
Exemple #3
0
 def ReadSInt32(self):
     """Reads and returns a signed, zigzag-encoded, varint-encoded,
 32-bit integer."""
     return wire_format.ZigZagDecode(self._stream.ReadVarUInt32())