AlkantarClanX12
Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/ |
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/gzip.cpython-33.pyc |
� ��fS_ c @ sB d 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 e e e d d � Z d d � Z d d � Z Gd d � d � Z Gd d � d e j � Z d d d � Z d d � Z d d � Z e d k r>e � n d S( u� Functions that read and write gzipped files. The user of the file doesn't have to worry about the compression, but random access is not allowed.i Nu GzipFileu openu compressu decompressi i i i i u rbi c C s* d | k r1 d | k r� t d | f � � q� nQ | d k rL t d � � n | d k rg t d � � n | d k r� t d � � n | j d d � } t | t t f � r� t | | | � } nB t | d � s� t | d � r� t d | | | � } n t d � � d | k r"t j | | | | � S| Sd S( u� Open a gzip-compressed file in binary or text mode. The filename argument can be an actual filename (a str or bytes object), or an existing file object to read from or write to. The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for binary mode, or "rt", "wt" or "at" for text mode. The default mode is "rb", and the default compresslevel is 9. For binary mode, this function is equivalent to the GzipFile constructor: GzipFile(filename, mode, compresslevel). In this case, the encoding, errors and newline arguments must not be provided. For text mode, a GzipFile object is created, and wrapped in an io.TextIOWrapper instance with the specified encoding, error handling behavior, and line ending(s). u tu bu Invalid mode: %ru0 Argument 'encoding' not supported in binary modeu. Argument 'errors' not supported in binary modeu/ Argument 'newline' not supported in binary modeu u readu writeu1 filename must be a str or bytes object, or a fileN( u ValueErroru Noneu replaceu isinstanceu stru bytesu GzipFileu hasattru TypeErroru iou TextIOWrapper( u filenameu modeu compresslevelu encodingu errorsu newlineu gz_modeu binary_file( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu open s$ c C s | j t j d | � � d S( Nu <L( u writeu structu pack( u outputu value( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu write32u? s u write32uc C s t j d | j d � � d S( Nu <Ii i ( u structu unpacku read( u input( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu read32D s u read32c B sn | Ee Z d Z d Z d d d � Z d d � Z d d d d � Z d d � Z d d d � Z d d � Z d S( u _PaddedFileu� Minimal read-only file object that prepends a string to the contents of an actual file. Shouldn't be used outside of gzip.py, as it lacks essential functionality.s c C s. | | _ t | � | _ | | _ d | _ d S( Ni ( u _bufferu lenu _lengthu fileu _read( u selfu fu prepend( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu __init__L s u _PaddedFile.__init__c C s� | j d k r | j j | � S| j | | j k ra | j } | j | 7_ | j | | j � S| j } d | _ | j | d � | j j | | j | � Sd S( N( u _readu Noneu fileu readu _lengthu _buffer( u selfu sizeu read( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu readR s u _PaddedFile.readc C s� | j d k r | | _ nQ | rO t | � | j k rO | j t | � 8_ d S| j | j d � | | _ t | j � | _ d | _ d S( Ni ( u _readu Noneu _bufferu lenu _length( u selfu prependu readprevious( ( u) /opt/alt/python33/lib64/python3.3/gzip.pyu prepend_ s u _PaddedFile.prependc C s'