
    6h\                       S SK Jr  S SKrS SKr\R                  (       a  S SKJrJr  S rSrSr	Sr
SrSrS	rS
rSrSrSrSrSrSrSrSrSr\R0                  " S\	S-  \-  5      r\R0                  " S\S-  \-  5      r\R0                  " S\S-  \-  5      r\R8                  " S5      r\R8                  " S5      r\R8                  " S5      r\R8                  " S5      r \R8                  " S5      r!Sr"Sr#S7S jr$S8S jr%S9S jr& S:   S;S jjr'S<S jr(S=S jr)S=S  jr*S! r+S=S" jr,S>S# jr-S?S$ jr.S@S% jr/SAS& jr0\1\%\2\(\3\)\4\)\5\-\6\,\7\/\8" S5      \00r9S=S' jr: " S( S)\;5      r<SBS* jr=\R8                  " S5      r>\R8                  " S+5      r?\R8                  " S,5      r@\R8                  " S-5      rAS rBSrCSrDSrESrFSrGSCSDS. jjrH SE       SFS/ jjrI " S0 S1\15      rJ " S2 S35      rK " S4 S55      rLS6 rMg)G    )annotationsN)IterableIterator                                          i  z>Bz>BBz>BHz>BLz>BQ      c                H   US:  a  [         R                  U S-  U-  5      $ US:  a  [        R                  U S-  S-  U5      $ US:  a  [        R                  U S-  S-  U5      $ US:  a  [        R                  U S-  S-  U5      $ [
        R                  U S-  S-  U5      $ )	z6Obtain a value encoding the major type and its length.   r
         r   l        r   r   )ENCODED_LENGTH_1packENCODED_LENGTH_2ENCODED_LENGTH_3ENCODED_LENGTH_4ENCODED_LENGTH_5)	majortypelengths     :/usr/lib/python3/dist-packages/mercurial/utils/cborutil.pyencodelengthr#   I   s    {$$Y!^f%<==	#$$Y!^b%8&AA	%$$Y!^b%8&AA	*	$$Y!^b%8&AA$$Y!^b%8&AA    c              #  J   #    [        [        [        U 5      5      v   U v   g 7fN)r#   MAJOR_TYPE_BYTESTRINGlenvs    r"   streamencodebytestringr+   W   s     
,c!f
55
Gs   !#c              #  |   #    [         v   U  H"  n[        [        [        U5      5      v   Uv   M$     [        v   g7f)zConvert an iterator of chunks to an indefinite bytestring.

Given an input that is iterable and each element in the iterator is
representable as bytes, emit an indefinite length bytestring.
N)BEGIN_INDEFINITE_BYTESTRINGr#   r'   r(   BREAK)itchunks     r"   streamencodebytestringfromiterr1   \   s5      &%0#e*==  Ks   :<c              #     #    [         v   Sn[        U 5      n XX!-    nU[        U5      -  n[        [        [        U5      5      v   Uv   X#:  a  OM;  [        v   g7f)zGiven a large source buffer, emit as an indefinite length bytestring.

This is a generator of chunks constituting the encoded CBOR data.
r   N)r-   r(   r#   r'   r.   )source	chunksizeilr0   s        r"    streamencodeindefinitebytestringr7   k   sb      &%	AFA
1=)	SZ0#e*==6  Ks   AAc              #     #    U S:  d  U S:  a  [        S5      eU S:  a  [        [        U 5      v   g [        [        [	        U 5      S-
  5      v   g 7f)Nl            l         zbig integers not supportedr   r   )
ValueErrorr#   MAJOR_TYPE_UINTMAJOR_TYPE_NEGINTabsr)   s    r"   streamencodeintr=      sL       A(=$=566Av?A..,c!fqj99s   AAc              #  ~   #    [        [        [        U 5      5      v   U  H  n[        U5       Sh  vN   M     g N	7f)z)Encode a known size iterable to an array.N)r#   MAJOR_TYPE_ARRAYr(   streamencode)r6   r5   s     r"   streamencodearrayrA      s3      'Q
00?"" "s   /=;
=c              #  h   #    [         v   U  H  n[        U5       Sh  vN   M     [        v   g N7f)z:Encode an iterator of items to an indefinite length array.N)BEGIN_INDEFINITE_ARRAYr@   r.   )r/   r5   s     r"   streamencodearrayfromiterrD      s0      ! ?""  K 	#s   202c                0    [        U 5      R                  U 4$ r&   )type__name__r)   s    r"   _mixedtypesortkeyrH      s    7Qr$   c              #  z   #    [        [        [        5      v   [        [	        U [
        S95       S h  vN   g  N7f)Nkey)r#   MAJOR_TYPE_SEMANTICSEMANTIC_TAG_FINITE_SETrA   sortedrH   )ss    r"   streamencodesetrP      s,      *,C
DD /@!ABBBs   1;9;c              #     #    [        [        [        U 5      5      v   [        U R	                  5       S S9 H+  u  p[        U5       Sh  vN   [        U5       Sh  vN   M-     g N N7f)zWEncode dictionary to a generator.

Does not supporting indefinite length dictionaries.
c                    [        U S   5      $ Nr   )rH   )xs    r"   <lambda>!streamencodemap.<locals>.<lambda>   s    6G!6Mr$   rJ   N)r#   MAJOR_TYPE_MAPr(   rN   itemsr@   )drK   values      r"   streamencodemapr[      sU     
 ~s1v
..QWWY,MN
$$$&&& O$&s$   AA+
A'A+A)
A+)A+c              #     #    [         v   U  H+  u  p[        U5       Sh  vN   [        U5       Sh  vN   M-     [        v   g N$ N7f)zFGiven an iterable of (key, value), encode to an indefinite length map.N)BEGIN_INDEFINITE_MAPr@   r.   )r/   rK   rZ   s      r"   streamencodemapfromiterr^      sB     

$$$&&&  K 	%&s   A	AA	AA	A	c              #  &   #    U (       a  SOSv   g 7f)N       )bs    r"   streamencodeboolrd      s     'G#s   c              #     #    Sv   g 7f)N   rb   r)   s    r"   streamencodenonerg      s
     
Ms   c                    [         R                  U R                  5      nU(       d(  [          H  n[        X5      (       d  M  [         U   n  O   U(       d  [	        S[        U 5      -  5      eU" U 5      $ )a  Encode a value in a streaming manner.

Given an input object, encode it to CBOR recursively.

Returns a generator of CBOR encoded bytes. There is no guarantee
that each emitted chunk fully decodes to a value or sub-value.

Encoding is deterministic - unordered collections are sorted.
zdo not know how to encode %s)STREAM_ENCODERSget	__class__
isinstancer9   rF   )r*   fntys      r"   r@   r@      sc     
		Q[[	)B!Ba$$ $B	 " 7$q'ABBa5Lr$   c                      \ rS rSrSrSrg)CBORDecodeError   z"Represents an error decoding CBOR.rb   N)rG   
__module____qualname____firstlineno____doc____static_attributes__rb   r$   r"   rp   rp      s    ,r$   rp   c                
    X   $ r&   rb   )rc   r5   s     r"   _elementtointegerrx      s	    4Kr$   s   >Hs   >Ls   >Qc                L   [        X5      nUS-  nUS-	  nU[        -  nU[        :X  a,  [        X@U5      u  pVnU(       a  SXgS-   [        4$ SSU[        4$ U[
        :X  a6  [        X@U5      u  pVnU(       a  Uc   eSU* S-
  US-   [        4$ SSU[        4$ U[        :X  ay  [        X@USS9u  pXnU(       d
  SSU[        4$ UbM  X-   U-   [        U 5      ::  a  XU-   X-   U-    nSXgU-   S-   [        4$ [        U 5      U-
  U-
  U-
  n	SSU	[        4$ SSS[        4$ U[        :X  a  [        S5      eU[        :X  a,  [        X@U5      u  pXnU(       a  SXS-   [        4$ SSU[        4$ U[        :X  a,  [        X@U5      u  pXnU(       a  SXS-   [        4$ SSU[        4$ U[        :X  a  [        X@U5      u  pZnU(       d
  SSU[        4$ U
[         :X  aa  X-   [        U 5      :  a
  SSS[        4$ [#        XU-   5      u  pXpU(       d
  SSU[        4$ U[        :w  a  [        S	5      eSXU-   S-   [$        4$ [        S
U
-  5      eU[&        :X  a^  U[(        :X  a
  SSS[        4$ U[*        :X  a
  SSS[        4$ U[,        :X  a
  SSS[        4$ U[.        :X  a
  SSS[0        4$ [        SU-  5      e e)aC  Decode a new CBOR value from a buffer at offset.

This function attempts to decode up to one complete CBOR value
from ``b`` starting at offset ``offset``.

The beginning of a collection (such as an array, map, set, or
indefinite length bytestring) counts as a single value. For these
special cases, a state flag will indicate that a special value was seen.

When called, the function either returns a decoded value or gives
a hint as to how many more bytes are needed to do so. By calling
the function repeatedly given a stream of bytes, the caller can
build up the original values.

Returns a tuple with the following elements:

* Bool indicating whether a complete value was decoded.
* A decoded value if first value is True otherwise None
* Integer number of bytes. If positive, the number of bytes
  read. If negative, the number of bytes we need to read to
  decode this value or the next chunk in this value.
* One of the ``SPECIAL_*`` constants indicating special treatment
  for this value. ``SPECIAL_NONE`` means this is a fully decoded
  simple value (such as an integer or bool).
r   r
   TFN)allowindefinitezstring major type not supportedz,expected array after finite set semantic tagzsemantic tag %d not allowedzspecial type %d not allowed)rx   SUBTYPE_MASKr:   
decodeuintSPECIAL_NONEr;   r'   r(   #SPECIAL_START_INDEFINITE_BYTESTRINGMAJOR_TYPE_STRINGrp   r?   SPECIAL_START_ARRAYrW   SPECIAL_START_MAPrL   rM   
decodeitemSPECIAL_START_SETMAJOR_TYPE_SPECIALSUBTYPE_FALSESUBTYPE_TRUESUBTYPE_NULLSUBTYPE_INDEFINITESPECIAL_INDEFINITE_BREAK)rc   offsetinitialr    subtypecompleterZ   	readcountsizewantedtagvalue
readcount2specials                r"   r   r   
  sI   6  *G
aKF1I$GO#%/F%C"A|;;$	<77	'	'%/F%C"$$$%!Y]L@@$	<77	+	+ %/%
!	 $	<77 !D(CF29,v/AD/HIU$4q$8,FF Q&94t;dFL88 q"EEE	'	'?@@	&	& %/w6$B!	1}.AAA$	<77	n	$ %/w6$B!	1}.???$	<77	)	)(27v(F%I$	<77 ..!SV+dB442<I%3/HJ dJ<<--%B  :59;LLL ""?("JKK	(	(m#<//$q,..$q,..**q"::: ""?'"IJJur$   c                   U S:  a  SU S4$ U S:X  a  U(       a  g[        S5      eU S:  a  [        SU -  5      eU S:X  a  [        nO2U S	:X  a  [        nO%U S
:X  a  [        nOU S:X  a  [        nO[        S5      e[        U5      U-
  UR                  :  a!  SUR                  X5      S   UR                  4$ SS[        U5      U-
  UR                  -
  4$ )a  Decode an unsigned integer.

``subtype`` is the lower 5 bits from the initial byte CBOR item
"header." ``b`` is a buffer containing bytes. ``offset`` points to
the index of the first byte after the byte that ``subtype`` was
derived from.

``allowindefinite`` allows the special indefinite length value
indicator.

Returns a 3-tuple of (successful, value, count).

The first element is a bool indicating if decoding completed. The 2nd
is the decoded integer value or None if not fully decoded or the subtype
is 31 and ``allowindefinite`` is True. The 3rd value is the count of bytes.
If positive, it is the number of additional bytes decoded. If negative,
it is the number of additional bytes needed to decode this value.
r   Tr   r   )TNr   z'indefinite length uint not allowed here   z'unsupported subtype on integer type: %dr   r   r   z#bounds condition checking violationFN)rp   STRUCT_BIG_UBYTESTRUCT_BIG_USHORTSTRUCT_BIG_ULONGSTRUCT_BIG_ULONGLONGr(   r   unpack_from)r   rc   r   rz   rO   s        r"   r}   r}     s    . |Wa	B !"KLL	B5?
 	
 "}	B	B	B CDD
1v!&& Q]]1-a0!&&88dCFVOaff444r$   c                  <    \ rS rSr% SrS\S'   S\S'   S	S
S jjrSrg)bytestringchunki  zRepresents a chunk/segment in an indefinite length bytestring.

This behaves like a ``bytes`` but in addition has the ``isfirst``
and ``islast`` attributes indicating whether this chunk is the first
or last in an indefinite length bytestring.
boolisfirstislastc                H    [         R                  X5      nX$l        X4l        U$ r&   )bytes__new__r   r   )clsr*   firstlastselfs        r"   r   bytestringchunk.__new__  s    }}S$r$   )r   r   N)FF)r   r   r   r   )rG   rr   rs   rt   ru   __annotations__r   rv   rb   r$   r"   r   r     s     ML r$   r   c                  f    \ rS rSrSrSrSrSrSrSr	Sr
S	rSS
 jr\SS j5       rSSS jjrS rSrg)sansiodecoderi  a  A CBOR decoder that doesn't perform its own I/O.

To use, construct an instance and feed it segments containing
CBOR-encoded bytes via ``decode()``. The return value from ``decode()``
indicates whether a fully-decoded value is available, how many bytes
were consumed, and offers a hint as to how many bytes should be fed
in next time to decode the next value.

The decoder assumes it will decode N discrete CBOR values, not just
a single value. i.e. if the bytestream contains uints packed one after
the other, the decoder will decode them all, rather than just the initial
one.

When ``decode()`` indicates a value is available, call ``getavailable()``
to return all fully decoded values.

``decode()`` can partially decode input. It is up to the caller to keep
track of what data was consumed and to pass unconsumed data in on the
next invocation.

The decoder decodes atomically at the *item* level. See ``decodeitem()``.
If an *item* cannot be fully decoded, the decoder won't record it as
partially consumed. Instead, the caller will be instructed to pass in
the initial bytes of this item on the next invocation. This does result
in some redundant parsing. But the overhead should be minimal.

This decoder only supports a subset of CBOR as required by Mercurial.
It lacks support for:

* Indefinite length arrays
* Indefinite length maps
* Use of indefinite length bytestrings as keys or values within
  arrays, maps, or sets.
* Nested arrays, maps, or sets within sets
* Any semantic tag that isn't a mathematical finite set
* Floating point numbers
* Undefined special value

CBOR types are decoded to Python types as follows:

uint -> int
negint -> int
bytestring -> bytes
map -> dict
array -> list
True -> bool
False -> bool
null -> None
indefinite length bytestring chunk -> [bytestringchunk]

The only non-obvious mapping here is an indefinite length bytestring
to the ``bytestringchunk`` type. This is to facilitate streaming
indefinite length bytestrings out of the decoder and to differentiate
a regular bytestring from an indefinite length bytestring.
r   r   r   r   r	   r
   r   c                ^    SU l         U R                  U l        / U l        S U l        / U l        g rS   )decodedbytecount_STATE_NONE_state_collectionstack_currentmapkey_decodedvaluesr   s    r"   __init__sansiodecoder.__init__.  s7    
 !"&& !# # !r$   c                4    U R                   U R                  :g  $ )z2Whether the decoder has partially decoded a value.)r   r   r   s    r"   
inprogresssansiodecoder.inprogressA  s     {{d....r$   c                   U(       d  [        U R                  5      SS4$ UnU[        U5      :  Ga  [        X5      u  pEpgUS:  a  U =R                  U-  sl        U(       d#  US:  d   e[        U R                  5      X#-
  U* 4$ X&-  nU R
                  U R                  :X  Ga  U[        :X  a  U R                  R                  U5        GOU[        :X  a1  U R                  R                  U/ S.5        U R                  U l        GOU[        :X  a1  U R                  R                  U0 S.5        U R                  U l        GOU[        :X  a9  U R                  R                  U[        5       S.5        U R                   U l        GOKU["        :X  a  U R$                  U l        GO.['        SU-  5      eU R
                  U R                  :X  Ga  U[        :X  a2  U R                  S   nUS   R                  U5        US==   S-  ss'   GOU[        :X  aR  U R                  S   n	/ n
U	S   R                  U
5        U	S==   S-  ss'   U R                  R                  UU
S.5        GOmU[        :X  ab  U R                  S   n	0 n
U	S   R                  U
5        U	S==   S-  ss'   U R                  R                  XZS.5        U R                  U l        GOU[        :X  ak  U R                  S   n	[        5       n
U	S   R                  U
5        U	S==   S-  ss'   U R                  R                  UU
S.5        U R                   U l        GOU["        :X  a  ['        S5      e['        S	U-  5      eU R
                  U R                  :X  af  U[        :X  a  XPl        U R*                  U l        GO,U["        :X  a  ['        S
5      eU[        [        [        4;   a  ['        S5      e['        SU-  5      eU R
                  U R*                  :X  Ga  U[        :X  a@  U R                  S   n	XYS   U R(                  '   U	S==   S-  ss'   U R                  U l        GOfU[        :X  a_  U R                  S   n	/ n
XS   U R(                  '   U	S==   S-  ss'   U R                  R                  UU
S.5        U R                  U l        OU[        :X  a_  U R                  S   n	0 n
XS   U R(                  '   U	S==   S-  ss'   U R                  R                  UU
S.5        U R                  U l        OU[        :X  ag  U R                  S   n	[        5       n
XS   U R(                  '   U	S==   S-  ss'   U R                  R                  UU
S.5        U R                   U l        O#U["        :X  a  ['        S5      e['        SU-  5      eSU l        GOU R
                  U R                   :X  a  U[        :X  a2  U R                  S   n	U	S   R-                  U5        U	S==   S-  ss'   GOU["        :X  a  ['        S5      eU[        [        [        4;   a  ['        S5      e['        SU-  5      eU R
                  U R$                  :X  a  U[        :X  a6  U R                  R                  [/        USS95        U R0                  U l        GO"U[2        :X  aI  U R                  R                  [/        SSSS95        U R                  (       a   eU R                  U l        O['        SU-  5      eU R
                  U R0                  :X  a  U[        :X  a%  U R                  R                  [/        U5      5        OxU[2        :X  aH  U R                  R                  [/        SSS95        U R                  (       a   eU R                  U l        O&['        SU-  5      e['        SU R
                  -  5      e U R
                  U R                  U R                  U R                   4;  a  OU R                  S   n	U	S   (       a  OU R                  R5                  5         U R                  (       aT  [6        U R                  [8        U R                  [        U R                   0[;        U R                  S   S   5         U l        O/U R                  R                  U	S   5        U R                  U l        M  U[        U5      :  a  GM  [        U R                  5      X#-
  S4$ )aM  Attempt to decode bytes from an input buffer.

``b`` is a collection of bytes and ``offset`` is the byte
offset within that buffer from which to begin reading data.

``b`` must support ``len()`` and accessing bytes slices via
``__slice__``. Typically ``bytes`` instances are used.

Returns a tuple with the following fields:

* Bool indicating whether values are available for retrieval.
* Integer indicating the number of bytes that were fully consumed,
  starting from ``offset``.
* Integer indicating the number of bytes that are desired for the
  next call in order to decode an item.
r   )	   remaining   vzunhandled special state: %dr{   r   r   r   z9indefinite length bytestrings not allowed as array valuesz5unhandled special item when expecting array value: %dz5indefinite length bytestrings not allowed as map keysz%collections not supported as map keysz1unhandled special item when expecting map key: %dz7indefinite length bytestrings not allowed as map valuesz3unhandled special item when expecting map value: %dNz7indefinite length bytestrings not allowed as set valuesz%collections not allowed as set valuesz3unhandled special item when expecting set value: %dT)r   r$   )r   r   z<unexpected special value when expecting bytestring chunk: %d)r   zunhandled decoder state: %d)r   r   r(   r   r   r   r   r~   appendr   r   _STATE_WANT_ARRAY_VALUEr   _STATE_WANT_MAP_KEYr   set_STATE_WANT_SET_VALUEr   "_STATE_WANT_BYTESTRING_CHUNK_FIRSTrp   r   _STATE_WANT_MAP_VALUEaddr   '_STATE_WANT_BYTESTRING_CHUNK_SUBSEQUENTr   poplistdictrF   )r   rc   r   initialoffsetr   rZ   r   r   clastcnewvalues              r"   decodesansiodecoder.decodeF  s   " ++,a22 s1vo 3=Q2G/HY1}%%2% 1}$},,-*J  F {{d...l*''..u5 33))00*/"$ #'">">DK 11))00*/"$ #'":":DK 11))00*/"%% #'"<"<DK CC"&"I"IDK *5? 
  < <<l*--b1AdGNN5)lOq(O
  33 11"5E!H$K&&x0,'1,'))00*/"*  11 11"5E!H$K&&x0,'1,'))00',= #'":":DK 11 11"5E"uH$K&&x0,'1,'))00*/"* #'"<"<DK CC)6  *46=>   8 88l**/'"&"<"<DK CC)2 
 '%%! 
 *?  *029:   : ::l* 11"5E7<$K 3 34,'1,'"&":":DK  33 11"5E!H7?$K 3 34,'1,'))00*/"* #'">">DK  11 11"5E!H7?$K 3 34,'1,'))00*/"* #'":":DK  11 11"5E"uH7?$K 3 34,'1,'))00*/"* #'"<"<DK CC)0  *24;< 
 '+#  : ::l* 11"5E$KOOE*,'1,' CC)0 
 '%%! 
 *?  *24;<   G GGl*''..'T: #'"N"NDK  88 ''..'4dC  $4444"&"2"2DK *9;BC   L LLl*''..u/EF  88''..s/NO  $4444"&"2"2DK *9;BC  &1DKK?  ;;00,,..' 
  --b1&
 %%))+ ((d::d66T77# 4004T:;	#=DK ''..uT{;"&"2"2DKE G
 s1voP $$%"
 	
r$   c                >    [        U R                  5      n/ U l        U$ )zuReturns an iterator over fully decoded values.

Once values are retrieved, they won't be available on the next call.
)r   r   )r   r6   s     r"   getavailablesansiodecoder.getavailable  s!     $$% r$   )r   r   r   r   r   NreturnNone)r   r   r   )r   intr   tuple[bool, int, int])rG   rr   rs   rt   ru   r   r   r   r   r   r   r   r   propertyr   r   r   rv   rb   r$   r"   r   r     sX    6p K)*&./+!& / /G
Rr$   r   c                  R    \ rS rSr% SrS\S'   S\S'   S\S'   SS	 jrSS
 jrS rSr	g)bufferingdecoderi  aP  A CBOR decoder that buffers undecoded input.

This is a glorified wrapper around ``sansiodecoder`` that adds a buffering
layer. All input that isn't consumed by ``sansiodecoder`` will be buffered
and concatenated with any new input that arrives later.

TODO consider adding limits as to the maximum amount of data that can
be buffered.
r   _decoderr   _chunksr   _wantedc                >    [        5       U l        / U l        SU l        g rS   )r   r   r   r   r   s    r"   r   bufferingdecoder.__init__  s    %r$   c                   [        U[        5      (       a  [        U5      nU R                  (       a  [	        U5      U R
                  :  aH  U R                  R                  U5        U =R
                  [	        U5      -  sl        SSU R
                  4$ [	        U5      nU R                  R                  U5        SR                  U R                  5      n/ U l        [	        U5      U-
  nOSnU R                  R                  U5      u  pEnX`l        U[	        U5      :  a  U R                  R                  XS 5        XEU-
  U4$ )a  Attempt to decode bytes to CBOR values.

Returns a tuple with the following fields:

* Bool indicating whether new values are available for retrieval.
* Integer number of bytes decoded from the new input.
* Integer number of bytes wanted to decode the next value.
Fr   r$   N)
rl   	bytearrayr   r   r(   r   r   joinr   r   )r   rc   newlenoldlen	availabler   r   s          r"   r   bufferingdecoder.decode  s    a##aA << 1v$##A&A&a-- VFLL"&ADLVf_F F'+}}';';A'>$	fs1vLL*.f,f44r$   c                6    U R                   R                  5       $ r&   )r   r   r   s    r"   r   bufferingdecoder.getavailable!  s    }}))++r$   )r   r   r   Nr   )r   r   )
rG   rr   rs   rt   ru   r   r   r   r   rv   rb   r$   r"   r   r     s)     ML
15f,r$   r   c                    U (       d  / $ [        5       nUR                  U 5      u  p#nU[        U 5      :w  a  [        S5      eUR                  (       a  [        S5      eUR                  5       $ )a^  Decode all CBOR items present in an iterable of bytes.

In addition to regular decode errors, raises CBORDecodeError if the
entirety of the passed buffer does not fully decode to complete CBOR
values. This includes failure to decode any value, incomplete collection
types, incomplete indefinite length items, and extra data at the end of
the buffer.
zinput data not fully consumedzinput data not complete)r   r   r(   rp   r   r   )rc   decoder
havevaluesr   	wantbytess        r"   	decodeallr   %  sb     	oG'.~~a'8$J9CF=>>788!!r$   )r    r   r!   r   r   r   )r*   r   r   Iterator[bytes])r/   zIterable[bytes]r   r   )r   )r4   r   r   r   )r*   r   r   r   )r   r   )rY   r   r   r   )r/   r   r   r   )rc   r   r   r   )r*   r   r   r   )r5   r   r   r   r   )r   r   )r   F)r   r   rc   r   r   r   rz   r   )N
__future__r   structtypingTYPE_CHECKINGr   r   r:   r;   r'   r   r?   rW   rL   r   r|   r   r   r   SUBTYPE_HALF_FLOATSUBTYPE_SINGLE_FLOATSUBTYPE_DOUBLE_FLOATr   rM   r   r-   rC   r]   Structr   r   r   r   r   r.   	BREAK_INTr#   r+   r1   r7   r=   rA   rD   rH   rP   r[   r^   rd   rg   r   r   r   tupler   r   r   rF   ri   r@   	Exceptionrp   rx   r   r   r   r   r~   r   r   r   r   r   r   r}   r   r   r   r   rb   r$   r"   <module>r      s   #  	              %kk
1
$'9
9   
a
"4
4  {{.A
 2
2  ==& ==' ==' ==' =='  		B
  #2:#C	'$
 
!
	/
J 	4-i - ==& MM%( ==' }}U+ &' #    Xx FK252525$'25>B25je &j jZH, H,V"r$   