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
def ReadSInt32(self): """Reads and returns a signed, zigzag-encoded, varint-encoded, 32-bit integer.""" return wire_format.ZigZagDecode(self._stream.ReadVarUInt32())