관리-도구
편집 파일: bz2.cpython-37.opt-2.pyc
B YI~dz0 � @ s� d dddddgZ dZddlmZ dd lZdd lZdd lZdd lZdd l m Z ddlmZm Z dZdZd ZG dd � d ej�Zddd�Zddd�Zdd� Zd S )�BZ2File� BZ2Compressor�BZ2Decompressor�open�compress� decompressz%Nadeem Vawda <nadeem.vawda@gmail.com>� )r N)�RLock)r r � � c @ s� e Zd Zd(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'� ZdS ).r �rN� c C sP t � | _d | _d| _t| _|d k r.t�dt� d| krBdksLn t d��|dkr^d}t }nb|dkrzd }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��| jt k�rFtj| jttd�}t�|�| _nd| _d S )NFz)Use of 'buffering' argument is deprecatedr r z%compresslevel must be between 1 and 9)� r �rbr )�w�wbr )�x�xbr )�a�abr zInvalid mode: %rT�read�writez6filename must be a str, bytes, file or PathLike object)Ztrailing_errorr )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 �(/opt/alt/python37/lib64/python3.7/bz2.py�__init__'