Your IP : 3.129.211.190
a
R�f�9 � @ s
d Z ddlZddlZddlZddlZddlZddlZejdedd� g d�Z G dd� de
�ZdZd Z
d
ZdZdZG d
d� d�Zdd� ZG dd� d�Zejdd� �ZG dd� d�ZG dd� d�ZG dd� d�Zdd� ZG dd� d�ZG dd � d �ZG d!d"� d"�Zd#d$� ZdS )%z�Macintosh binhex compression/decompression.
easy interface:
binhex(inputfilename, outputfilename)
hexbin(inputfilename, outputfilename)
� Nzthe binhex module is deprecated� )�
stacklevel)�binhex�hexbin�Errorc @ s e Zd ZdS )r N)�__name__�
__module__�__qualname__� r
r
�+/opt/alt/python39/lib64/python3.9/binhex.pyr % s r � i � �@ � �c @ s e Zd Zdd� ZdS )�FInfoc C s d| _ d| _d| _d S )Nz????r )�Type�Creator�Flags��selfr
r
r �__init__6 s zFInfo.__init__N)r r r r r
r
r
r r 5 s r c C s� t � }t�| d��<}|�d�}d|vr,d|_|�dd� |�� }W d � n1 sT0 Y tj� | �\}}|�
ddd�}|||dfS ) N�rbi r ZTEXTr �:�-r )r �io�open�readr �seek�tell�os�path�split�replace)�name�finfo�fp�dataZdsize�dir�filer
r
r �getfileinfo; s
&r( c @ s, e Zd Zdd� Zdd� Zdd� Zdd� Zd S )
�openrsrcc G s d S �Nr
�r �argsr
r
r r I s zopenrsrc.__init__c G s dS �N� r
r+ r
r
r r L s z
openrsrc.readc G s d S r* r
r+ r
r
r �writeO s zopenrsrc.writec C s d S r* r
r r
r
r �closeR s zopenrsrc.closeN)r r r r r r/ r0 r
r
r
r r) H s r) c c s@ t �� �$ t �ddt� d V W d � n1 s20 Y d S )N�ignore� )�warnings�catch_warnings�filterwarnings�DeprecationWarningr
r
r
r �_ignore_deprecation_warningX s
r7 c @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd
S )�_Hqxcoderenginez(Write data to the coder in 3-byte chunksc C s || _ d| _d| _td | _d S )Nr. r )�ofpr% �hqxdata�LINELEN�linelen�r r9 r
r
r r b s z_Hqxcoderengine.__init__c C s� | j | | _ t| j �}|d d }| j d |� }| j |d � | _ |sHd S t� �" | jt�|� | _W d � n1 sv0 Y | �d� d S )N� r )r% �lenr7 r: �binascii�b2a_hqx�_flush)r r% ZdatalenZtodor
r
r r/ h s
0z_Hqxcoderengine.writec C sr d}|t | j�| j krH|| j }| j�| j||� d � t| _|}q| j|d � | _|rn| j�| jd � d S )Nr �
s :
)r? r: r<