관리-도구
편집 파일: gzip.cpython-36.opt-2.pyc
3 \nO � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZddddgZd\Z Z ZZZ d\ZZdd d�Zdd� ZG dd� d�ZG dd� dej�ZG dd� dej�Zddd�Zdd� Zdd� Zedkr�e� dS )� N�GzipFile�open�compress� decompress� � � � � �rb� c C s� d|kr d|krPt d|f ��n0|d k r0t d��|d k r@t d��|d k rPt d��|jdd�}t| tttjf�r|t| ||�}n,t| d�s�t| d �r�td ||| �}nt d ��d|kr�t j||||�S |S d S )N�t�bzInvalid mode: %rz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary mode� �read�writez1filename must be a str or bytes object, or a file)� ValueError�replace� isinstance�str�bytes�os�PathLiker �hasattr� TypeError�io� TextIOWrapper)�filename�mode� compresslevel�encoding�errors�newlineZgz_modeZbinary_file� r# �/usr/lib64/python3.6/gzip.pyr s$ c C s | j tjd|�� d S )Nz<L)r �structZpack)�output�valuer# r# r$ �write32u@ s r( c @ s8 e Zd Zd dd�Zdd� Zddd�Zdd � Zd d� ZdS )�_PaddedFile� c C s || _ t|�| _|| _d| _d S )Nr )�_buffer�len�_length�file�_read)�self�f�prependr# r# r$ �__init__J s z_PaddedFile.__init__c C s~ | j d kr| jj|�S | j | | jkrJ| j }| j |7 _ | j|| j � S | j }d | _ | j|d � | jj|| j | � S d S )N)r/ r. r r- r+ )r0 �sizer r# r# r$ r P s z_PaddedFile.readc C s>