����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
python310
/
lib64
/
python3.10
/
__pycache__
/
Filename :
bz2.cpython-310.opt-2.pyc
back
Copy
o �����=?hG.����������������������@���s���� �g�d��Z�dZddlmZ�ddlZddlZddlZddlm Z m Z �dZdZdZ G�dd ��d ej�Z ddd �Zddd�Zdd��ZdS�))�BZ2File� BZ2Compressor�BZ2Decompressor�open�compress� decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>�����)r���N)r���r�����������c�������������������@���s����e�Zd�Z �d)dd�dd�Zdd��Zedd ���Zd d��Zdd ��Zdd��Z dd��Z d*dd�Zd+dd�Zd+dd�Z dd��Zd+dd�Zd+dd�Zd d!��Zd"d#��Zejfd$d%�Zd&d'��Zd(S�),r����r� ����� compresslevelc����������������C���s8�� �d�|�_�d|�_t|�_d|��krdkstd���td��|dv�r%d}t}n1|dv�r3d}t}t|�|�_n#|d v�rAd }t}t|�|�_n|dv�rOd}t}t|�|�_ntd |f���t |t ttj f�rlt||�|�_�d|�_||�_nt|d�svt|d�r}||�_�||�_ntd��|�jtkr�tj|�j�ttd�}t�|�|�_d�S�d|�_d�S�)NFr���r���z%compresslevel must be between 1 and 9)��r ����rbr���)�w�wbr���)�x�xbr���)�a�abr����Invalid mode: %rT�read�writez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr���)�_fp�_closefp�_MODE_CLOSED�_mode� ValueError� _MODE_READ�_MODE_WRITEr����_compressor� isinstance�str�bytes�os�PathLike� _builtin_open�hasattr� TypeError�_compressionZDecompressReaderr����OSError�io�BufferedReader�_buffer�_pos)�self�filename�moder ���Z mode_code�raw��r3����*/opt/alt/python310/lib64/python3.10/bz2.py�__init__%���sL���� � zBZ2File.__init__c�����������������C���s�� �|�j�tkrd�S�zQ|�j�tkr|�j����n|�j�tkr%|�j�|�j� ����d�|�_W�z&|�j r>|�j����W�d�|�_d|�_ t|�_�d�|�_d�S�W�d�|�_d|�_ t|�_�d�|�_d�S�d�|�_d|�_ t|�_�d�|�_w�z$|�j rq|�j����W�d�|�_d|�_ t|�_�d�|�_w�W�d�|�_d|�_ t|�_�d�|�_w�d�|�_d|�_ t|�_�d�|�_w�)NF)r���r���r���r-����closer���r���r���r ����flushr����r/���r3���r3���r4���r6���a���sT��� � � ����z BZ2File.closec�����������������C���s��� �|�j�tkS��N)r���r���r8���r3���r3���r4����closedy���s��� zBZ2File.closedc�����������������C���s��� �|������|�j���S�r9���)�_check_not_closedr����filenor8���r3���r3���r4���r<���~������� zBZ2File.filenoc�����������������C���s��� �|�����o |�j���S�r9���)�readabler-����seekabler8���r3���r3���r4���r?�������s���zBZ2File.seekablec�����������������C������� �|������|�jtkS�r9���)r;���r���r���r8���r3���r3���r4���r>�������r=���zBZ2File.readablec�����������������C���r@���r9���)r;���r���r���r8���r3���r3���r4����writable����r=���zBZ2File.writabler���c�����������������C������� �|������|�j�|�S�r9���)�_check_can_readr-����peek)r/����nr3���r3���r4���rD�������s���zBZ2File.peek���c�����������������C���rB���r9���)rC���r-���r����r/����sizer3���r3���r4���r�������s���zBZ2File.readc�����������������C���s$��� �|������|dk�rtj}|�j�|�S�)Nr���)rC���r+����DEFAULT_BUFFER_SIZEr-����read1rG���r3���r3���r4���rJ�������s ���z BZ2File.read1c�����������������C���rB���r9���)rC���r-����readinto)r/����br3���r3���r4���rK�������s���zBZ2File.readintoc�����������������C����:��� �t�|t�st|d�std��|���}|�����|�j�|�S��N� __index__zInteger argument expected)r!����intr'���r(���rO���rC���r-����readlinerG���r3���r3���r4���rQ����������� zBZ2File.readlinec�����������������C���rM���rN���)r!���rP���r'���r(���rO���rC���r-���� readlinesrG���r3���r3���r4���rS�������rR���zBZ2File.readlinesc�����������������C���sZ��� �|������t|ttf�rt|�}nt|�}|j}|�j�|�}|�j � |��|��j|7��_|S�r9���)Z_check_can_writer!���r#���� bytearray�len� memoryview�nbytesr ���r���r���r���r.���)r/����dataZlengthZ compressedr3���r3���r4���r�������s��� z BZ2File.writec�����������������C���s��� �t�j�|�|�S�r9���)r)���� BaseStream� writelines)r/����seqr3���r3���r4���rZ�������s���zBZ2File.writelinesc�����������������C���s��� �|������|�j�||�S�r9���)Z_check_can_seekr-����seek)r/����offset�whencer3���r3���r4���r\�������s���zBZ2File.seekc�����������������C���s$��� �|������|�jtkr|�j���S�|�jS�r9���)r;���r���r���r-����tellr.���r8���r3���r3���r4���r_�����s ��� zBZ2File.tellN)r ���)r���)rF���)�__name__� __module__�__qualname__r5���r6����propertyr:���r<���r?���r>���rA���rD���r���rJ���rK���rQ���rS���r���rZ���r+����SEEK_SETr\���r_���r3���r3���r3���r4���r������s(���� < r���r���r���c�����������������C���s���� �d|v�rd|v�rt�d|f���n|d�urt�d��|d�ur!t�d��|d�ur)t�d��|�dd�}t|�||d�}d|v�rGt�|�}t�||||�S�|S�) N�trL���r���z0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moder���r���)r����replacer���r+���� text_encoding� TextIOWrapper)r0���r1���r ����encoding�errors�newlineZbz_modeZbinary_filer3���r3���r4���r�����s"���� r���c�����������������C���s��� �t�|�}|�|��|����S�r9���)r���r���r7���)rX���r ����compr3���r3���r4���r���9��s���r���c�����������������C���sd��� �g�}|�r-t���}z|�|��}W�n�ty���|rY�n��w�|�|��|js(td��|j}�|�sd�|�S�)NzACompressed data ended before the end-of-stream marker was reached�����)r���r���r*����append�eofr���Zunused_data�join)rX���ZresultsZdecomp�resr3���r3���r4���r���D��s"���� � r���)r���r���NNN)r���)�__all__� __author__�builtinsr���r&���r+���r$���r)���Z_bz2r���r���r���r���r���rY���r���r���r���r3���r3���r3���r4����<module>���s$�����v � *