Your IP : 3.145.88.241
o
6��f; � @ s G d d� d�Z dS )c @ sZ e Zd Zddd�Zdd� Zdd� Zd d
� Zdd� Zddd�Zdd� Z ddd�Z
dd� ZdS )�ChunkTFc C s� dd l }d| _|| _|rd}nd}|| _|�d�| _t| j�dk r#t�z|�|d |�d��d | _ W n |j
y> td �w |rG| j d | _ d| _z| j�� | _
W n ttfya d| _Y d S w d| _d S ) N� F�>�<� �L� T)�struct�closed�align�file�read� chunkname�len�EOFErrorZunpack_from� chunksize�error� size_read�tell�offset�AttributeError�OSError�seekable)�selfr r
Z bigendianZ
inclheaderr Zstrflag� r �,/opt/alt/python310/lib64/python3.10/chunk.py�__init__4 s0 ��
zChunk.__init__c C � | j S �N)r
�r r r r �getnameN � z
Chunk.getnamec C r r )r r r r r �getsizeR r z
Chunk.getsizec C s( | j sz
| �� W d| _ d S d| _ w d S )NT)r �skipr r r r �closeV s
�zChunk.closec C s | j rtd��dS )N�I/O operation on closed fileF)r �
ValueErrorr r r r �isatty] s zChunk.isattyr c C sx | j rtd��| jstd��|dkr|| j }n |dkr"|| j }|dk s+|| jkr-t�| j�| j | d� || _d S )Nr$ zcannot seek� � r )
r r% r r r r �RuntimeErrorr �seekr )r �pos�whencer r r r* b s
z
Chunk.seekc C s | j rtd��| jS )Nr$ )r r% r r r r r r u s z
Chunk.tell���c C s� | j rtd��| j| jkrdS |dk r| j| j }|| j| j kr(| j| j }| j�|�}| jt|� | _| j| jkrR| jrR| jd@ rR| j�d�}| jt|� | _|S )Nr$ � r r'