
    (phm                    L    S SK Jr  S SKrS SKJrJrJrJr   " S S\\   5      rg)    )annotationsN)IOAnyStrGenericLiteralc                  |    \ rS rSrSrSS jrSS jr\R                  4SS jjr	SS jr
SSS jjrSS jrSS	 jrS
rg)ContainerIO   za
A file object that provides read access to a part of an existing
file (for example a TAR file).
c                l    Xl         SU l        X l        X0l        U R                   R	                  U5        g)z
Create file object.

:param file: Existing file.
:param offset: Start of region, in bytes.
:param length: Size of region, in bytes.
r   N)fhposoffsetlengthseek)selffiler   r   s       B/var/www/html/venv/lib/python3.13/site-packages/PIL/ContainerIO.py__init__ContainerIO.__init__   s*     #V    c                    g)NF r   s    r   isattyContainerIO.isatty-   s    r   c                >   US:X  a  U R                   U-   U l         O!US:X  a  U R                  U-   U l         OXl         [        S[        U R                   U R                  5      5      U l         U R                  R                  U R                  U R                   -   5        g)z
Move file pointer.

:param offset: Offset in bytes.
:param mode: Starting position. Use 0 for beginning of region, 1
   for current offset, and 2 for end of region.  You cannot move
   the pointer outside the defined region.
      r   N)r   r   maxminr   r   r   )r   r   modes      r   r   ContainerIO.seek0   sq     19xx&(DHQY{{V+DHHq#dhh45T[[488+,r   c                    U R                   $ )zM
Get current file pointer.

:returns: Offset from start of region, in bytes.
)r   r   s    r   tellContainerIO.tellC   s     xxr   c                0   U(       a#  [        XR                  U R                  -
  5      nOU R                  U R                  -
  nU(       d  SU R                  R                  ;   a  S$ S$ U R                  U-   U l        U R                  R                  U5      $ )z}
Read data.

:param n: Number of bytes to read. If omitted or zero,
    read until end of region.
:returns: An 8-bit string.
br    )r    r   r   r   r!   read)r   ns     r   r)   ContainerIO.readK   sn     A{{TXX-.Adhh&A-352588a<ww||Ar   c                    SU R                   R                  ;   a  SOSnSU R                   R                  ;   a  SOSn U R                  S5      nU(       d   U$ X-   nX2:X  a   U$ M)  )z2
Read a line of text.

:returns: An 8-bit string.
r'   r   r(      

r   )r   r!   r)   )r   snewline_charactercs       r   readlineContainerIO.readline\   sj     $'',,.CB%(DGGLL%8Ed		!A  A% r   c                b    / n U R                  5       nU(       d   U$ UR                  U5        M-  )zB
Read multiple lines of text.

:returns: A list of 8-bit strings.
)r2   append)r   linesr/   s      r   	readlinesContainerIO.readlinesm   s4     A LLO	 r   )r   r   r   r   N)r   z
IO[AnyStr]r   intr   r9   returnNone)r:   bool)r   r9   r!   zLiteral[0, 1, 2]r:   r;   )r:   r9   )r   )r*   r9   r:   r   )r:   r   )r:   zlist[AnyStr])__name__
__module____qualname____firstlineno____doc__r   r   ioSEEK_SETr   r$   r)   r2   r7   __static_attributes__r   r   r   r	   r	      s3    
" :< -&""r   r	   )	
__future__r   rB   typingr   r   r   r   r	   r   r   r   <module>rG      s%     # 	 / /c'&/ cr   