AlkantarClanX12

Your IP : 3.135.200.121


Current Path : /lib64/python3.8/__pycache__/
Upload File :
Current File : //lib64/python3.8/__pycache__/bz2.cpython-38.opt-2.pyc

U

e5d1�@s�ddddddgZdZddlmZdd	lZdd	lZdd	lZdd	lZdd
l	m
Z
ddlmZm
Z
dZdZd
Ze�ZGdd�dej�Zddd�Zddd�Zdd�Zd	S)�BZ2File�
BZ2Compressor�BZ2Decompressor�open�compress�
decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>�)rN)�RLock)rr��c@s�eZdZdedfdd�Zdd�Zedd��Zd	d
�Zdd�Z	d
d�Z
dd�Zd(dd�Zd)dd�Z
d*dd�Zdd�Zd+dd�Zd,dd�Zdd �Zd!d"�Zejfd#d$�Zd%d&�Zd'S)-r�r�	cCsTt�|_d|_d|_t|_|tk	r2tjdt	dd�d|krFdksPnt
d��|dkrbd	}t}nb|d
kr~d}t}t
|�|_nF|dkr�d
}t}t
|�|_n*|dkr�d}t}t
|�|_nt
d|f��t|tttjf�r�t||�|_d|_||_n.t|d��st|d��r||_||_ntd��|jtk�rJtj|jttd�}t�|�|_nd|_dS)NFzGUse of 'buffering' argument is deprecated and ignored since Python 3.0.�)�
stacklevelr	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)r�_lock�_fp�_closefp�_MODE_CLOSED�_mode�	_sentinel�warnings�warn�DeprecationWarning�
ValueError�
_MODE_READ�_MODE_WRITEr�_compressor�
isinstance�str�bytes�os�PathLike�
_builtin_open�hasattr�	TypeError�_compressionZDecompressReaderr�OSError�io�BufferedReader�_buffer�_pos)�self�filename�mode�	buffering�
compresslevelZ	mode_code�raw�r;�/usr/lib64/python3.8/bz2.py�__init__)sT��zBZ2File.__init__cCs�|j��|jtkr W5QR�dSz<|jtkr8|j��n"|jtkrZ|j�	|j
���d|_
W5z|jrp|j��W5d|_d|_t|_d|_XXW5QRXdS)NF)rrrrrr3�closer$r%rr&�flush�r5r;r;r<r>ps 



z
BZ2File.closecCs
|jtkS�N)rrr@r;r;r<�closed�szBZ2File.closedcCs|��|j��SrA)�_check_not_closedr�filenor@r;r;r<rD�szBZ2File.filenocCs|��o|j��SrA)�readabler3�seekabler@r;r;r<rF�szBZ2File.seekablecCs|��|jtkSrA)rCrr$r@r;r;r<rE�szBZ2File.readablecCs|��|jtkSrA)rCrr%r@r;r;r<�writable�szBZ2File.writablerc
Cs2|j�"|��|j�|�W5QR�SQRXdSrA)r�_check_can_readr3�peek)r5�nr;r;r<rI�szBZ2File.peek���c
Cs2|j�"|��|j�|�W5QR�SQRXdSrA)rrHr3r�r5�sizer;r;r<r�szBZ2File.readc
Cs@|j�0|��|dkrtj}|j�|�W5QR�SQRXdS)Nr)rrHr1�DEFAULT_BUFFER_SIZEr3�read1rLr;r;r<rO�s
z
BZ2File.read1c
Cs2|j�"|��|j�|�W5QR�SQRXdSrA)rrHr3�readinto)r5�br;r;r<rP�szBZ2File.readintoc
CsVt|t�s$t|d�std��|��}|j�"|��|j�|�W5QR�SQRXdS�N�	__index__zInteger argument expected)	r'�intr-r.rSrrHr3�readlinerLr;r;r<rU�s

zBZ2File.readlinec
CsVt|t�s$t|d�std��|��}|j�"|��|j�|�W5QR�SQRXdSrR)	r'rTr-r.rSrrHr3�	readlinesrLr;r;r<rV�s

zBZ2File.readlinesc
CsX|j�H|��|j�|�}|j�|�|jt|�7_t|�W5QR�SQRXdSrA)rZ_check_can_writer&rrrr4�len)r5�dataZ
compressedr;r;r<r�sz
BZ2File.writec
Cs,|j�tj�||�W5QR�SQRXdSrA)rr/�
BaseStream�
writelines)r5�seqr;r;r<rZ�szBZ2File.writelinesc
Cs4|j�$|��|j�||�W5QR�SQRXdSrA)rZ_check_can_seekr3�seek)r5�offset�whencer;r;r<r\szBZ2File.seekc
CsL|j�<|��|jtkr0|j��W5QR�S|jW5QR�SQRXdSrA)rrCrr$r3�tellr4r@r;r;r<r_s

zBZ2File.tellN)r)rK)rK)rK)rK)�__name__�
__module__�__qualname__rr=r>�propertyrBrDrFrErGrIrrOrPrUrVrrZr1�SEEK_SETr\r_r;r;r;r<rs$G





	

rrcCs�d|kr d|krPtd|f��n0|dk	r0td��|dk	r@td��|dk	rPtd��|�dd�}t|||d�}d|kr�t�||||�S|SdS)	N�trQrz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moder)r9)r#�replacerr1�
TextIOWrapper)r6r7r9�encoding�errors�newlineZbz_modeZbinary_filer;r;r<r!scCst|�}|�|�|��SrA)rrr?)rXr9�compr;r;r<rJscCshg}|r^t�}z|�|�}Wn tk
r<|r6Yq^n�YnX|�|�|jsVtd��|j}qd�|�S)NzACompressed data ended before the end-of-stream marker was reached�)rrr0�append�eofr#Zunused_data�join)rXZresultsZdecomp�resr;r;r<rUs
)rrNNN)r)�__all__�
__author__�builtinsrr,r1r*r r/Z	threadingrZ_bz2rrrr$r%�objectrrYrrrr;r;r;r<�<module>s4��
)