Sindbad~EG File Manager
�
&ٜg` � �T � d dl mZ d dlZddlmZ G d� dej e � Zy)� )�annotationsN� )�ContainerIOc �$ � � e Zd ZdZd� fd�Z� xZS )�TarIOzHA file object that provides read access to a given member of a TAR file.c �
�� t |d� | _ | j j d� }t |� dk7 r
d}t |� �|dd j d� }|j
d� }|dk( r
d }t |� �|dkD r|d| }t |d
d d� }||k( rn1| j j |d
z dz t j � ��t �| �1 | j | j j � |� y)zz
Create file object.
:param tarfile: Name of TAR file.
:param file: Name of member file.
�rbi zunexpected end of tar fileN�d zutf-8� r zcannot find subfile�| � � i� i ���)�open�fh�read�len�OSError�decode�find�int�seek�io�SEEK_CUR�super�__init__�tell) �self�tarfile�file�s�msg�name�i�size� __class__s ��4/usr/local/lib/python3.12/site-packages/PIL/TarIO.pyr zTarIO.__init__ s� �� � �w��%���������S�!�A��1�v��}�2���c�l�"��T�c�7�>�>�'�*�D�� � �$��A��A�v�+���c�l�"��1�u��B�Q�x���q��S�z�1�%�D��t�|���G�G�L�L�$��*��.����<�'