AlkantarClanX12

Your IP : 18.117.8.177


Current Path : /proc/thread-self/root/proc/self/root/lib64/python2.7/Demo/zlib/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/lib64/python2.7/Demo/zlib/minigzip.pyc

�
Afc@s�ddlZddlZddlZd
\ZZZZZd�Zd�Z	d	�Z
d
�Zd�Ze
dkr|e�ndS(i����NiiiiicCs~|jt|d@��|d}|jt|d@��|d}|jt|d@��|d}|jt|d@��dS(Ni�i(twritetchr(toutputtvalue((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pytwrite32s


cCspt|jd��}|t|jd��d>7}|t|jd��d>7}|t|jd��d>7}|S(Niiii(tordtread(tinputtv((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pytread32s
cCs.|jd�|jtt��tj|�}|d}t||�|jd�|jd�|j|d�tjd�}tjdtj	tj
tjd�}xQtr�|j
d	�}|dkr�Pntj||�}|j|j|��q�W|j|j��t||�t||d
�dS(Ns�iss�sti	iii(RRtFNAMEtoststatRtzlibtcrc32tcompressobjtDEFLATEDt	MAX_WBITSt
DEF_MEM_LEVELtTrueRtcompresstflush(tfilenameRRtstatvaltmtimetcrcvaltcompobjtdata((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pyRs(




	
c
Cs{|jd�}|dkr0dGHtjd�nt|jd��dkr`dGHtjd�nt|jd��}|jd�|t@r�t|jd��}|d	t|jd��7}|j|�n|t@rx,tr|jd�}|d
kr�Pq�q�Wn|t@r@x,tr<|jd�}|d
krPqqWn|t@rZ|jd�nt	j
t	j�}t	jd�}d}xgtr�|jd�}	|	dkr�Pn|j
|	�}
|j|
�|t|
�7}t	j|
|�}q�W|j�}
|j|
�|t|
�7}t	j|
|�}|jd
d�t|�}t|�}||krcdGHn||krwdGHndS(Nis�sNot a gzipped fileiiisUnknown compression methodiisR
ii����sCRC check failed.s!Incorrect length of data producedii(RtsystexitRtFEXTRARRtFCOMMENTtFHCRCRt
decompressobjRRt
decompressRtlenRtseekR	(
RRtmagictflagtxlentst	decompobjRtlengthRt
decompdataRtisize((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pyR#1s^


	
	
	

cCs�ttj�dkr/dGHdGHtjd�ntjd}|jd�r^t}|d }nt}|d}t|d�}t|d	�}|r�t|||�n
t	||�|j
�|j
�dS(
NisUsage: minigzip.py <filename>s.  The file will be compressed or decompressed.iis.gzi����trbtwb(R$RtargvRtendswithtFalseRtopenRR#tclose(Rtcompressingt
outputnameRR((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pytmainks"




t__main__(iiiii(RRRtFTEXTR!RRR RR	RR#R7t__name__(((s*/usr/lib64/python2.7/Demo/zlib/minigzip.pyt<module>s$				: