ok
Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/zlib/ |
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/usr/lib64/python2.7/Demo/zlib/minigzip.pyo |
� цdc @ s� d d l Z d d l Z d d l Z d \ Z Z Z Z Z d � Z d � Z d � Z d � Z d � Z e d k r| e � n d S( i����Ni i i i i c C s~ | j t | d @� � | d } | j t | d @� � | d } | j t | d @� � | d } | j t | d @� � d S( Ni� i ( t writet chr( t outputt value( ( s* /usr/lib64/python2.7/Demo/zlib/minigzip.pyt write32 s c C sp t | j d � � } | t | j d � � d >7} | t | j d � � d >7} | t | j d � � d >7} | S( Ni i i i ( t ordt read( t inputt v( ( s* /usr/lib64/python2.7/Demo/zlib/minigzip.pyt read32 s c C s. | j d � | j t t � � t j | � } | d } t | | � | j d � | j d � | j | d � t j d � } t j d t j t j t j d � } xQ t r� | j d � } | d k r� Pn t j | | � } | j | j | � � q� W| j | j � � t | | � t | | d � d S( Ns �i s s �t t i i i i ( R R t FNAMEt ost statR t zlibt crc32t compressobjt DEFLATEDt MAX_WBITSt DEF_MEM_LEVELt TrueR t compresst flush( t filenameR R t statvalt mtimet crcvalt compobjt data( ( s* /usr/lib64/python2.7/Demo/zlib/minigzip.pyR s( c C s{ | j d � } | d k r0 d GHt j d � n t | j d � � d k r` d GHt j d � n t | j d � � } | j d � | t @r� t | j d � � } | d t | j d � � 7} | j | � n | t @rx, t r| j d � } | d k r� Pq� q� Wn | t @r@x, t r<| j d � } | d k rPqqWn | t @rZ| j d � n t j t j � } t j d � } d } xg t r�| j d � } | d k r�Pn | j | � } | j | � | t | � 7} t j | | � } q�W| j � } | j | � | t | � 7} t j | | � } | j d d � t | � } t | � } | | k rcd GHn | | k rwd GHn d S( Ni s �s Not a gzipped filei i i s Unknown compression methodi i R R i i����s CRC check failed.s! Incorrect length of data producedi i ( R t syst exitR t FEXTRAR R t FCOMMENTt FHCRCR t decompressobjR R t decompressR t lenR t seekR ( R R t magict flagt xlent st decompobjR t lengthR t decompdataR t isize( ( s* /usr/lib64/python2.7/Demo/zlib/minigzip.pyR$ 1 s^ c C s� t t j � d k r/ d GHd GHt j d � n t j d } | j d � r^ t } | d } n t } | d } t | d � } t | d � } | r� t | | | � n t | | � | j � | j � d S( Ni s Usage: minigzip.py <filename>s. The file will be compressed or decompressed.i i s .gzi����t rbt wb( R% R t argvR t endswitht FalseR t openR R$ t close( R t compressingt outputnameR R ( ( s* /usr/lib64/python2.7/Demo/zlib/minigzip.pyt maink s"