+
    i&  c                   s    R t ^ RIt^ RIt]P                  t ! R R]P
                  4      t ! R R]P                  4      tR# )z,Internal classes used by compression modulesNc                   s<   a  ] tR t^	t o RtR tR tR tR tRt	V t
R# )
BaseStreamzMode-checking helper functions.c                s@    V P                   '       d   \        R 4      hR# )zI/O operation on closed fileN)Zclosed
ValueErrorself   &5/usr/lib64/python3.14/compression/_common/_streams.py_check_not_closedZBaseStream._check_not_closed   s    ;;;;<<     c                ^    V P                  4       '       g   \        P                  ! R 4      hR# )zFile not open for readingN)readableioUnsupportedOperationr   r   r   _check_can_readZBaseStream._check_can_read   $    }}))*EFF r   c                r   )zFile not open for writingN)Zwritabler
   r   r   r   r   _check_can_writeZBaseStream._check_can_write   r   r   c                s    V P                  4       '       g   \        P                  ! R 4      hV P                  4       '       g   \        P                  ! R4      hR# )z3Seeking is only supported on files open for readingz3The underlying file object does not support seekingN)r	   r
   r   seekabler   r   r   _check_can_seekZBaseStream._check_can_seek   sS    }})) +F G G}})) +E F F r    N)__name__
__module____qualname____firstlineno____doc__r   r   r   r   __static_attributes____classdictcell__)__classdict__s   @r   r    r    	   s%     )=GGF Fr   r    c                   s   a a ] tR t^!t oRtR tRR ltV 3R ltR tR t	RR lt
R tR	 t]P                  3R
 ltR tRtVtV ;t# )DecompressReaderz5Adapts the decompressor API to a RawIOBase reader APIc                s    R # )Tr   r   r   r   r	   ZDecompressReader.readable$   s    r   c                s    Wn         R V n        ^ V n        RV n        W n        W@n        V P                  ! R/ V P
                  B V n        W0n        R# )FNr   )_fp_eof_pos_size_decomp_factory_decomp_args_decompressor_trailing_error)r   ZfpZdecomp_factoryZtrailing_errorZdecomp_argss   &&&&,r   __init__ZDecompressReader.__init__'   sP    		 
  .'!11FD4E4EF  .r   c                s.   < R V n         \        SV `	  4       # N)r"   Zsuperclose)r   	__class__s   &r   r&   ZDecompressReader.close;   s    !w}r   c                s6    V P                   P                  4       # r%   )r   r   r   r   r   r   ZDecompressReader.seekable?   s    xx  ""r   c           
     s,   \        V4      ;_uu_ 4       q"P                  R 4      ;_uu_ 4       pV P                  \        V4      4      pWCR\        V4      % RRR4       RRR4       \        X4      #   + '       g   i     L#; i  + '       g   i     L.; i)ZBN)Z
memoryviewZcastreadlen)r   ZbZviewZ	byte_viewdatas   &&   r   readintoZDecompressReader.readintoB   sY    ]]dIIcNNi99S^,D$(js4y! %3] 4y %3N]]s"   B(A0	B0B ;BB	c                sZ   V^ 8  d   V P                  4       # V'       d   V P                  '       d   R# Rp V P                  P                  '       d   V P                  P                  ;'       g     V P
                  P                  \        4      pV'       g   MV P                  ! R/ V P                  B V n         V P                  P                  W14      pMlV P                  P                  '       d4   V P
                  P                  \        4      pV'       g   \        R4      hMRpV P                  P                  W14      pV'       g   EK   V'       g   RV n        V P                  V n        R# V ;P                  \!        V4      ,          un        V#   T P                   d     KZ  i ; i)    r   NTzACompressed file ended before the end-of-stream marker was reachedr   )readallr   r"   ZeofZunused_datar   r(   BUFFER_SIZEr    r!   Z
decompressr#   Zneeds_inputZEOFErrorr   r   r)   )r   Zsizer*   Zrawblocks   &&  r   r(   ZDecompressReader.readH   s`   !8<<>!tyyy !!%%% ..:: 7 7 HHMM+6 %)%9%9 &)''&)"--88HD
 %%111#xx}}[9H#& (J K K $  #H))44XDtDIDJ		SY	' ++ s   ;F F*)F*c                s    . pV P                  \        P                  4      ;p'       d   VP                  V4       K:  R P	                  V4      # )r   )r(   sysZmaxsizeZappendZjoin)r   Zchunksr*   s   &  r   r-   ZDecompressReader.readallq   s<     ii,,d,MM$xxr   c                s    V P                   P                  ^ 4       RV n        ^ V n        V P                  ! R/ V P
                  B V n        R# )r,   FNr   )r   seekr   r   r    r!   r"   r   r   r   _rewindZDecompressReader._rewind|   s<    a		!11FD4E4EFr   c                s   V\         P                  8X  d   MV\         P                  8X  d   V P                  V,           pM{V\         P                  8X  dM   V P
                  ^ 8  d(   V P                  \         P                  4      '       d   K'  V P
                  V,           pM\        RP                  V4      4      hWP                  8  d   V P                  4        MWP                  ,          pV^ 8  dS   V P                  \        \         P                  V4      4      pV'       g    V P                  # V\        V4      ,          pKY  V P                  # )r,   zInvalid value for whence: {})r
   SEEK_SETZSEEK_CURr   ZSEEK_ENDr   r(   DEFAULT_BUFFER_SIZEr   Zformatr1   Zminr)   )r   ZoffsetZwhencer*   s   &&& r   r0   ZDecompressReader.seek   s    R[[ r{{"YY'Fr{{"zzA~ii 6 677ZZ&(F;BB6JKK IILLNiiF qj99S!7!7@AD yy c$iFyyr   c                s    V P                   # )z!Return the current file position.)r   r   r   r   tellZDecompressReader.tell   s    yyr   )r!   r    r"   r   r   r   r   r#   )r   )r   )r   r   r   r   r   r	   r$   r&   r   r+   r(   r-   r1   r
   r2   r0   r4   r   r   Z__classcell__)r'   r   s   @@r   r   r   !   sJ     ?.(#'R G #%++ < r   r   )	r   r
   r/   r3   r.   ZBufferedIOBaser    Z	RawIOBaser   r   r   r   <module>r5      s?    2 	 
$$F"" F0Ar|| Ar   