+
     Bi                         R t ^ RIt^ RIt]P                  tRR lt ! R R]P                  4      t ! R R]P                  4      t ! R R]P                  4      t	 ! R	 R
]P                  4      t
R tR# )zPython 'utf-16' Codec


Written by Marc-Andre Lemburg (mal@lemburg.com).

(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.

Nc                 0    \         P                  ! WR 4      # )T)codecsutf_16_decode)inputerrorss   &&'/usr/lib/python3.14/encodings/utf_16.pydecoder      s    t44    c                   F   a  ] tR t^t o RR ltR	R ltR tR tR tRt	V t
R# )
IncrementalEncoderc                R    \         P                  P                  W4       R V n        R # N)r   r   __init__encoderselfr   s   &&r   r   IncrementalEncoder.__init__   s    !!**48r	   c                6   V P                   fk   \        P                  ! WP                  4      ^ ,          p\        P
                  R8X  d   \        P                  V n         V# \        P                  V n         V# V P                  WP                  4      ^ ,          # Nlittle)r   r   utf_16_encoder   sys	byteorderutf_16_le_encodeutf_16_be_encode)r   r   finalresults   &&& r   encodeIncrementalEncoder.encode   sq    <<))%=a@F}}(%66 M  &66M||E;;/22r	   c                R    \         P                  P                  V 4       R V n        R # r   )r   r   resetr   r   s   &r   r    IncrementalEncoder.reset!   s    !!''-r	   c                &    V P                   f   ^# ^ # r   r   r!   s   &r   getstateIncrementalEncoder.getstate%   s    
 \\)1q1r	   c                    V'       d
   R V n         R # \        P                  R8X  d   \        P                  V n         R # \        P
                  V n         R # r   )r   r   r   r   r   r   r   states   &&r   setstateIncrementalEncoder.setstate,   s2    DL}}(%66%66r	   r$   Nstrict)F)__name__
__module____qualname____firstlineno__r   r   r    r%   r*   __static_attributes____classdictcell____classdict__s   @r   r   r      s#     327 7r	   r   c                   B   a  ] tR t^5t o RR ltR tR tR tR tRt	V t
R# )	IncrementalDecoderc                R    \         P                  P                  W4       R V n        R # r   )r   BufferedIncrementalDecoderr   decoderr   s   &&r   r   IncrementalDecoder.__init__6   s    ))224@r	   c                :   V P                   fs   \        P                  ! W^ V4      w  rEpVR8X  d   \        P                  V n         WE3# V^8X  d   \        P                  V n         WE3# V^8  d   \        RV^ ^R4      hWE3# V P                  WP                  V4      # )Nutf-16Stream does not start with BOM)r:   r   utf_16_ex_decodeutf_16_le_decodeutf_16_be_decodeUnicodeDecodeErrorr   )r   r   r   r   outputconsumedr   s   &&&&   r   _buffer_decode!IncrementalDecoder._buffer_decode:   s    <<''q%@ *VyB%66
 %%	 a%66 %% Q(5!Q@`aa%%||E;;66r	   c                R    \         P                  P                  V 4       R V n        R # r   )r   r9   r    r:   r!   s   &r   r    IncrementalDecoder.resetG   s    ))//5r	   c                    \         P                  P                  V 4      ^ ,          pV P                  f   V^3# \	        \
        P                  R8H  V P                  \         P                  J 8g  4      pW3# )    big)r   r9   r%   r:   intr   r   rB   )r   r)   addstates   &  r   r%   IncrementalDecoder.getstateK   sl     11::4@C
 <<1:.(?(??A B  r	   c                p   \         P                  P                  W4       V^,          pV^ 8X  d=   \        P                  R8X  d   \         P
                  M\         P                  V n        R# V^8X  d=   \        P                  R8X  d   \         P                  M\         P
                  V n        R# RV n        R# )   rL   N)r   r9   r*   r   r   rB   rA   r:   r(   s   &&r   r*   IncrementalDecoder.setstateY   s    ))224?aA:"}}5 #33!'!8!8 L aZ"}}5 #33!'!8!8 L  DLr	   )r:   Nr,   )r.   r/   r0   r1   r   rF   r    r%   r*   r2   r3   r4   s   @r   r7   r7   5   s#     7!   r	   r7   c                   :   a  ] tR t^ht o RR ltR tRR ltRtV tR# )StreamWriterc                T    \         P                  P                  WV4       R V n        R # r   )r   rT   r   r   )r   streamr   s   &&&r   r   StreamWriter.__init__i   s    $$T6:r	   c                R    \         P                  P                  V 4       R V n        R # r   )r   rT   r    r   r!   s   &r   r    StreamWriter.resetm   s    !!$'r	   c                    V P                   fZ   \        P                  ! W4      p\        P                  R8X  d   \        P
                  V n         V# \        P                  V n         V# V P                  W4      # r   )r   r   r   r   r   r   r   )r   r   r   r   s   &&& r   r   StreamWriter.encodeq   s_    <<))%8F}}(%66 M  &66M<<..r	   r$   Nr,   )	r.   r/   r0   r1   r   r    r   r2   r3   r4   s   @r   rT   rT   h   s     	/ 	/r	   rT   c                   0   a  ] tR t^|t o R tRR ltRtV tR# )StreamReaderc                n    \         P                  P                  V 4        V =R #   \         d     R # i ; ir   )r   r]   r    r   AttributeErrorr!   s   &r   r    StreamReader.reset~   s2    !!$'	 		s   % 44c                    \         P                  ! W^ R4      w  r4pVR8X  d   \         P                  V n        W43# V^8X  d   \         P                  V n        W43# V^8  d   \        RV^ ^R4      hW43# )rK   Fr=   r>   r?   )r   r@   rA   r   rB   rC   )r   r   r   objectrE   r   s   &&&   r   r   StreamReader.decode   s    ##E1e< 	&9? 11DK
 !!	 !^ 11DK !! q[$Xua<\]]!!r	   )r   Nr,   )r.   r/   r0   r1   r    r   r2   r3   r4   s   @r   r]   r]   |   s     	" 	"r	   r]   c            
      l    \         P                  ! R \        \        \        \
        \        \        R7      # )r=   )namer   r   incrementalencoderincrementaldecoderstreamreaderstreamwriter)r   	CodecInfor   r   r   r7   r]   rT    r	   r   getregentryrl      s*    --!! r	   r,   )__doc__r   r   r   r   r   r   r9   r7   rT   r]   rl   rk   r	   r   <module>rn      sp     
		5!722 !7F1 :: 1 f/6&& /("6&& ",	r	   