HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/google/protobuf/__pycache__/proto.cpython-310.pyc
o

�h�
�@s�dZddlZddlmZmZddlmZddlmZddlm	Z	eddd	�Z
dd
e
dedefd
d�Z
dee
dede
fdd�Zd
e
dejddfdd�Zdee
dejde
fdd�ZdS)z,Contains the Nextgen Pythonic protobuf APIs.�N)�Type�TypeVar)�decoder)�encoder)�Message�_MESSAGEr)�bound�message�
deterministic�returncCs|j|d�S)aReturn the serialized proto.

  Args:
    message: The proto message to be serialized.
    deterministic: If true, requests deterministic serialization
        of the protobuf, with predictable ordering of map keys.

  Returns:
    A binary bytes representation of the message.
  )r
)�SerializeToString)r	r
�r
�H/usr/local/CyberCP/lib/python3.10/site-packages/google/protobuf/proto.py�	serializesr�
message_class�payloadcCs|�}|�|�|S)z�Given a serialized data in binary form, deserialize it into a Message.

  Args:
    message_class: The message meta class.
    payload: A serialized bytes in binary form.

  Returns:
    A new message deserialized from payload.
  )�ParseFromString)rr�new_messager
r
r�parse"s

r�outputcCsB|��}t��|j|�|�t|��}||krtd||f��dS)a�Writes the size of the message as a varint and the serialized message.

  Writes the size of the message as a varint and then the serialized message.
  This allows more data to be written to the output after the message. Use
  parse_length_prefixed to parse messages written by this method.

  The output stream must be buffered, e.g. using
  https://docs.python.org/3/library/io.html#buffered-streams.

  Example usage:
    out = io.BytesIO()
    for msg in message_list:
      proto.serialize_length_prefixed(msg, out)

  Args:
    message: The protocol buffer message that should be serialized.
    output: BytesIO or custom buffered IO that data should be written to.
  z_Failed to write complete message (wrote: %d, expected: %d). Ensure output is using buffered IO.N)�ByteSizer�_VarintEncoder�writer�	TypeError)r	r�size�out_sizer
r
r�serialize_length_prefixed1s���r�input_bytescCsZt�|�}|durdS|�}|dkr|S|�|�|��}||kr+td�|||jj���|S)a�Parse a message from input_bytes.

  Args:
    message_class: The protocol buffer message class that parser should parse.
    input_bytes: A buffered input.

  Example usage:
    while True:
      msg = proto.parse_length_prefixed(message_class, input_bytes)
      if msg is None:
        break
      ...

  Returns:
    A parsed message if successful. None if input_bytes is at EOF.
  NrzdTruncated message or non-buffered input_bytes: Expected {0} bytes but only {1} bytes parsed for {2}.)r�
_DecodeVarintr�read�
ValueError�format�
DESCRIPTOR�name)rrrr	�parsed_sizer
r
r�parse_length_prefixedOs
�r%)N)�__doc__�io�typingrr�google.protobuf.internalrr�google.protobuf.messagerr�bool�bytesrr�BytesIOrr%r
r
r
r�<module>s"���