????
Your IP : 18.188.151.206
o
�?Og;�@s Gdd�d�ZdS)c@sZeZdZddd�Zdd�Zdd�Zd d
�Zdd�Zddd�Zdd�Z ddd�Z
dd�ZdS)�ChunkTFc Cs�ddl}d|_||_|rd}nd}||_|�d�|_t|j�dkr#t�z|�|d|�d��d|_ Wn|j
y>td�w|rG|j d|_ d|_z|j��|_
Wnttfyad|_YdSwd|_dS) N�F�>�<��L�T)�struct�closed�align�file�read� chunkname�len�EOFErrorZunpack_from� chunksize�error� size_read�tell�offset�AttributeError�OSError�seekable)�selfrr
Z bigendianZ
inclheaderrZstrflag�r�,/opt/alt/python310/lib64/python3.10/chunk.py�__init__4s0 ��
zChunk.__init__cC� |jS�N)r
�rrrr�getnameN�z
Chunk.getnamecCrr)rrrrr�getsizeRr z
Chunk.getsizecCs(|jsz
|��Wd|_dSd|_wdS)NT)r �skiprrrr�closeVs
�zChunk.closecCs|jrtd��dS)N�I/O operation on closed fileF)r �
ValueErrorrrrr�isatty]szChunk.isattyrcCsx |jrtd��|jstd��|dkr||j}n |dkr"||j}|dks+||jkr-t�|j�|j |d�||_dS)Nr$zcannot seek��r)
r r%rrrr�RuntimeErrorr�seekr)r�pos�whencerrrr*bs
z
Chunk.seekcCs|jrtd��|jS)Nr$)r r%rrrrrrusz
Chunk.tell���cCs� |jrtd��|j|jkrdS|dkr|j|j}||j|jkr(|j|j}|j�|�}|jt|�|_|j|jkrR|jrR|jd@rR|j�d�}|jt|�|_|S)Nr$�rr')r r%rrrrrr
)r�size�data�dummyrrrrzs&��z
Chunk.readcCs� |jrtd��|jr7z"|j|j}|jr|jd@r|d}|j�|d�|j||_WdSty6Ynw|j|jkrWt d|j|j�}|�
|�}|sOt�|j|jks=dSdS)Nr$r'i )r r%rrrr
rr*r�minrr)r�nr1rrrr"�s(�
�z
Chunk.skipN)TTF)r)r-)�__name__�
__module__�__qualname__rrr!r#r&r*rrr"rrrrr3s
rN)rrrrr�<module>s2