
    9h              	          % S SK Jr  S SKJrJr  S SKJr  SSKJr	  S\
S\\
/S4   S	\
4S
 jrS\
S	\
4S jrSS\S\
S	\\
\
4   4S jjrS\\
   S	\
4S jr\\\\4   /\
4   \S'   \\\
/\\
\
4   4   \S'   \\
/\
4   \S'   \\
\\
/S4   /\
4   \S'   \(       a	  \r\r\r\rg SSKJrJrJrJr  \r\r\r\rg! \ a    \r\r\r\r gf = f)    )Iterable)CallableUnion)NO_EXTENSIONS   )crcvaluewriteNreturnc                    U S-  U S-	  -  n U S::  a	  U" U 5        gU S::  a  U" SU S-  -  5        U" U S-	  5        gU S::  a+  U" SU S-  -  5        U" SU S-	  S-  -  5        U" U S	-	  5        g
U S::  a<  U" SU S-  -  5        U" SU S-	  S-  -  5        U" SU S	-	  S-  -  5        U" U S-	  5        gU S::  aM  U" SU S-  -  5        U" SU S-	  S-  -  5        U" SU S	-	  S-  -  5        U" SU S-	  S-  -  5        U" U S-	  5        gU S-  nU S-  n SnU (       a#  U" SU-  5        U S-  nU S-  n US-  nU (       a  M#  U" U5        U$ )aD  Encode an integer to a varint presentation. See
https://developers.google.com/protocol-buffers/docs/encoding?csw=1#varints
on how those can be produced.

    Arguments:
        value (int): Value to encode
        write (function): Called per byte that needs to be written

    Returns:
        int: Number of bytes written
r   ?      ?                                  r    )r	   r
   bitsis       YC:\Suresh\moveshuttle\MDcreated\moveengine\venv\Lib\site-packages\aiokafka/record/util.pyencode_varint_pyr    	   s    aZERK(E}ededl#$eqjdedl#$duzT)*+erk	dedl#$duzT)*+du{d*+,erkdedl#$duzT)*+du{d*+,du{d*+,erk t|!$+4<DaKEFA	 e
 
$KH    c                     U S-  U S-	  -  n U S::  a  gU S::  a  gU S::  a  gU S::  a  g	U S
::  a  gU S::  a  gU S::  a  gU S::  a  gU S::  a  gg)zFNumber of bytes needed to encode an integer in variable-length format.r   r   r   r   r   r   r   r   r   r   r   l      l    r   l      l    	   
   r   )r	   s    r   size_of_varint_pyr'   >   sz    aZERK(E}	  ""r!   bufferposc                     X   nUS-  (       d
  US-	  US-   4$ US-  (       d  US-	  S-  US-   4$ US-  nUS-  nSn X   nX$S-  U-  -  nUS-  nUS-  (       d  US-	  US-  * -  U4$ US-  nUS:  a  [        S5      eMC  )	aX  Decode an integer from a varint presentation. See
https://developers.google.com/protocol-buffers/docs/encoding?csw=1#varints
on how those can be produced.

    Arguments:
        buffer (bytearry): buffer to read from.
        pos (int): optional position to read from

    Returns:
        (int, int): Decoded int value and next read position
   r   r   r   r   @   zOut of int64 range)
ValueError)r(   r)   resultshiftbs        r   decode_varint_pyr2   V   s     [FTM!cAg%%TM!#S1W,,
dNF1HCE
Kt8%%qDq[fqjM1377
B;122 r!   memviewc                     [        U 5      nU$ )zACalculate CRC-32C (Castagnoli) checksum over a memoryview of data)	crc32c_py)r3   r   s     r   calc_crc32c_pyr6   v   s    
G
CJr!   calc_crc32cdecode_varintsize_of_varintencode_varint)crc32c_cythondecode_varint_cythonencode_varint_cythonsize_of_varint_cython)r   )collections.abcr   typingr   r   aiokafka.utilr   _crc32cr   r5   intr    r'   	bytearraytupler2   r6   bytes__annotations__r7   r8   r9   r:   	_crecordsr;   r<   r=   r>   ImportErrorr   r!   r   <module>rJ      sP   $ " ' %2C 2#(= 2# 2jS S 03Y 3S 3sCx 3@HSM c  uUI-./45 5C(%S/9: :#$ $hud{34c9: : K$M&N$M)	
 	
 -,.# )$(*(	)s   #B8 8C	C	