AlkantarClanX12

Your IP : 3.128.31.76


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

3


 \�0�
@s�ddddddgZdZddlmZdd	lZdd	lZdd	lZdd	lZydd
l	m
Z
Wn ek
rpdd
lm
Z
YnXddl
mZmZdZdZd
ZGdd�dej�Zddd�Zddd�Zdd�Zd	S)�BZ2File�
BZ2Compressor�BZ2Decompressor�open�compress�
decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>�)rN)�RLock)rr��c@s�eZdZd(dd�Zdd�Zedd	��Zd
d�Zdd
�Zdd�Z	dd�Z
d)dd�Zd+dd�Zd-dd�Z
dd�Zd/dd�Zd1dd�Zd d!�Zd"d#�Zejfd$d%�Zd&d'�ZdS)2r�rN�	cCsTt�|_d|_d|_t|_|dk	r.tjdt�d|ko@dknsNt	d��|dkr`d}t
}nb|dkr|d
}t}t|�|_
nF|dkr�d}t}t|�|_
n*|dkr�d}t}t|�|_
nt	d|f��t|tttjf��r�t||�|_d|_||_n.t|d��st|d��r||_||_ntd��|jt
k�rJtj|jttd�}tj|�|_nd|_dS)NFz)Use of 'buffering' argument is deprecatedr	rz%compresslevel must be between 1 and 9�r�rb�w�wb�x�xb�a�abzInvalid mode: %rT�read�writez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr)r
rr)rr)rr)rr)r�_lock�_fp�_closefp�_MODE_CLOSED�_mode�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�r7�/usr/lib64/python3.6/bz2.py�__init__+sL
zBZ2File.__init__cCs�|j��|jtkrdSz<|jtkr.|jj�n"|jtkrP|jj|j	j
��d|_	Wdz|jrf|jj�Wdd|_d|_t|_d|_XXWdQRXdS)NF)rrrr r/�closer!rrr"�flushr)r1r7r7r8r:ps 



z
BZ2File.closecCs
|jtkS)N)rr)r1r7r7r8�closed�szBZ2File.closedcCs|j�|jj�S)N)�_check_not_closedr�fileno)r1r7r7r8r>�szBZ2File.filenocCs|j�o|jj�S)N)�readabler/�seekable)r1r7r7r8r@�szBZ2File.seekablecCs|j�|jtkS)N)r=rr )r1r7r7r8r?�szBZ2File.readablecCs|j�|jtkS)N)r=rr!)r1r7r7r8�writable�szBZ2File.writablerc	Cs&|j�|j�|jj|�SQRXdS)N)r�_check_can_readr/�peek)r1�nr7r7r8rC�szBZ2File.peekr	c	Cs&|j�|j�|jj|�SQRXdS)N)rrBr/r)r1�sizer7r7r8r�szBZ2File.readc	Cs4|j�$|j�|dkrtj}|jj|�SQRXdS)Nr)rrBr-�DEFAULT_BUFFER_SIZEr/�read1)r1rEr7r7r8rG�s
z
BZ2File.read1c	Cs&|j�|j�|jj|�SQRXdS)N)rrBr/�readinto)r1�br7r7r8rH�szBZ2File.readintoc	CsJt|t�s$t|d�std��|j�}|j�|j�|jj|�SQRXdS)N�	__index__zInteger argument expected)	r#�intr)r*rJrrBr/�readline)r1rEr7r7r8rL�s

zBZ2File.readlinec	CsJt|t�s$t|d�std��|j�}|j�|j�|jj|�SQRXdS)NrJzInteger argument expected)	r#rKr)r*rJrrBr/�	readlines)r1rEr7r7r8rM�s

zBZ2File.readlinescCsL|j�<|j�|jj|�}|jj|�|jt|�7_t|�SQRXdS)N)rZ_check_can_writer"rrrr0�len)r1�dataZ
compressedr7r7r8r�sz
BZ2File.writec
Cs |j�tjj||�SQRXdS)N)rr+�
BaseStream�
writelines)r1�seqr7r7r8rQ�szBZ2File.writelinesc
Cs(|j�|j�|jj||�SQRXdS)N)rZ_check_can_seekr/�seek)r1�offset�whencer7r7r8rSszBZ2File.seekc	Cs4|j�$|j�|jtkr$|jj�S|jSQRXdS)N)rr=rr r/�tellr0)r1r7r7r8rVs


zBZ2File.tell)rNr)r���)rWrW)rWrW)rWrW)rW)�__name__�
__module__�__qualname__r9r:�propertyr<r>r@r?rArCrrGrHrLrMrrQr-�SEEK_SETrSrVr7r7r7r8r s"
E




	

rrcCs�d|kr d|krPtd|f��n0|dk	r0td��|dk	r@td��|dk	rPtd��|jdd�}t|||d�}d|kr�tj||||�S|SdS)	N�trIzInvalid mode: %rz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary moder
)r5)r�replacerr-�
TextIOWrapper)r2r3r5�encoding�errors�newlineZbz_modeZbinary_filer7r7r8r!scCst|�}|j|�|j�S)N)rrr;)rOr5�compr7r7r8rJscCsjg}xZ|r^t�}y|j|�}Wntk
r<|r6Pn�YnX|j|�|jsVtd��|j}qWdj|�S)NzACompressed data ended before the end-of-stream marker was reached�)rrr,�append�eofrZunused_data�join)rOZresultsZdecomp�resr7r7r8rUs

)rrNNN)r)�__all__�
__author__�builtinsrr(r-r&rr+Z	threadingr�ImportErrorZdummy_threadingZ_bz2rrrr r!rPrrrr7r7r7r8�<module>s,

(