Your IP : 3.149.242.223
���]$O � @ sR d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d d d g Z d d d d d
f \ Z Z
Z Z Z
d d f \ Z Z d d d d d d
d � Z d d � Z Gd d � d � Z Gd d � d e j � Z Gd d � d e j � Z d d d � Z d d � Z d d � Z e d k rNe � d S)� N�GzipFile�open�compress�
decompress� � � � � �rb� c C s d | k r. d | k rv t d | f � � nH | d k rF t d � � | d k r^ t d � � | d k rv t d � � | j d d � } t | t t f � r� t | | | � } nB t | d � s� t | d � r� t d | | | � } n t d
� � d | k rt j | | | | � S| Sd 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�bytesr �hasattr� TypeError�io�
TextIOWrapper)�filename�mode�
compresslevel�encoding�errors�newlineZgz_mode�binary_file� r"