b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/gzip.pyc
Size14.05 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:30
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc
@sÝdZddkZddkZddkZddkZddkZddgZddddd f\ZZZ Z
Z ddf\Z Z
d
�Zd �Zd d
d�Zdfd��YZd�Zedjo e�ndS(s�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ÿÿÿÿNtGzipFiletopeniiiiicCs|itid|��dS(Ns<L(twritetstructtpack(toutputtvalue((s/usr/lib64/python2.6/gzip.pytwrite32uscCstid|id��dS(Ns<Iii(Rtunpacktread(tinput((s/usr/lib64/python2.6/gzip.pytread32strbi cCst|||�S(s�Shorthand for GzipFile(filename, mode, compresslevel).

The filename argument is required; mode defaults to 'rb'
and compresslevel defaults to 9.

(R(tfilenametmodet
compresslevel((s/usr/lib64/python2.6/gzip.pyRscBs+eZdZd Zd"Zd d dd d�Zed��Zd�Z d�Z
d�Z d �Z d
�Z
d �Zd d
�Zd�Zdd�Zd�Zd�Zd�Zd�Zeid�Zd�Zd�Zd�Zd�Zdd�Zd d�Zdd�Zd�Z d�Z!d�Z"RS(#s�The GzipFile class simulates most of the methods of a file object with
the exception of the readinto() and truncate() methods.

i
ii c Cs¸|od|jo|d7}n|djo$ti||pd�}|_n|djo't|d�o
|i}q�d}n|djo't|d�o
|i}q»d}n|dd!djo:t|_t|_ d|_
d|_ ||_d |_ n||dd!d
jp|dd!d joBt
|_|i|�ti|titi tid�|_ntd |d
�||_d|_|it
jo|i�ndS(sAConstructor for the GzipFile class.

At least one of fileobj and filename must be given a
non-trivial value.

The new class instance is based on fileobj, which can be a regular
file, a StringIO object, or any other object which simulates a file.
It defaults to None, in which case filename is opened to provide
a file object.

When fileobj is not None, the filename argument is only used to be
included in the gzip file header, which may includes the original
filename of the uncompressed file. It defaults to the filename of
fileobj, if discernible; otherwise, it defaults to the empty string,
and in this case the original filename is not included in the header.

The mode argument can be any of 'r', 'rb', 'a', 'ab', 'w', or 'wb',
depending on whether the file will be read or written. The default
is the mode of fileobj if discernible; otherwise, the default is 'rb'.
Be aware that only the 'rb', 'ab', and 'wb' values should be used
for cross-platform portability.

The compresslevel argument is an integer from 1 to 9 controlling the
level of compression; 1 is fastest and produces the least compression,
and 9 is slowest and produces the most compression. The default is 9.

tbR tnametRiitridtwtasMode s not supportedN(tNonet __builtin__Rt myfileobjthasattrRRtREADtTruet _new_membertextrabuft extrasizet min_readsizetWRITEt _init_writetzlibt compressobjtDEFLATEDt MAX_WBITSt
DEF_MEM_LEVELtcompresstIOErrortfileobjtoffsett_write_gzip_header(tselfR
RRR)((s/usr/lib64/python2.6/gzip.pyt__init__,s@ 
$





     
( 
   cCsVddk}|idtd�|itjo |iddjo |idS|iS(Niÿÿÿÿsuse the name attributeiiýÿÿÿs.gz(twarningstwarntDeprecationWarningRR R(R,R.((s/usr/lib64/python2.6/gzip.pyR
rs
 $ cCs6t|i�}d|dd!dtt|��dS(Ns<gzip iiÿÿÿÿt t>(treprR)thextid(R,ts((s/usr/lib64/python2.6/gzip.pyt__repr__zscCs>||_tid�d@|_d|_g|_d|_dS(NRlÿÿi(RR"tcrc32tcrctsizetwritebuftbufsize(R,R
((s/usr/lib64/python2.6/gzip.pyR!~s
   cCsÓ|iid�|iid�|i}|id�o|d }nd}|o
t}n|iit|��t|itti���|iid�|iid�|o|ii|d�ndS( Ns�ss.gziýÿÿÿissÿt( R)RRtendswithtFNAMEtchrRtlongttime(R,tfnametflags((s/usr/lib64/python2.6/gzip.pyR+�s 
cCs#tid�d@|_d|_dS(NRlÿÿi(R"R8R9R:(R,((s/usr/lib64/python2.6/gzip.pyt
_init_read�scCs�|iid�}|djo
td�nt|iid��}|djo
td�nt|iid��}|iid�|t@oLt|iid��}|dt|iid��}|ii|�n|t@o?x<to0|iid�}| p
|d joPqëqëWn|t@o?x<to0|iid�}| p
|d joPq5q5Wn|t@o|iid�ndS(
Nis�sNot a gzipped fileiisUnknown compression methodiiR=( R)R R(tordtFEXTRAR?RtFCOMMENTtFHCRC(R,tmagictmethodtflagtxlenR6((s/usr/lib64/python2.6/gzip.pyt_read_gzip_header�s4



     cCsÍ|itjo"ddk}t|id��n|idjo
td�nt|�djog|i t|�|_ t
i ||i �d@|_ |ii
|ii|��|it|�7_ndS(Niÿÿÿÿs$write() on read-only GzipFile objects!write() on closed GzipFile objectilÿÿ(RR terrnoR(tEBADFR)Rt
ValueErrortlenR:R"R8R9RR'R*(R,tdataRO((s/usr/lib64/python2.6/gzip.pyR»s 
iÿÿÿÿc Csu|itjo"ddk}t|id��n|idjo|idjodSd}|djoYy6x/to'|i |�t
|i |d�}qpWWq5t j
o|i}q5Xnsy?x8||ijo'|i |�t
|i |d�}qÉWWn0t j
o$||ijo
|i}q5nX|i
| }|i
||_
|i||_|i|7_|S(Niÿÿÿÿs$read() on write-only GzipFile objectiRii(RRROR(RPRR)RRt_readtmintmax_read_chunktEOFErrorRR*(R,R:ROtreadsizetchunk((s/usr/lib64/python2.6/gzip.pyR Ès6  



cCs?||i|_t|�|i|_|it|�8_dS(N(RRRRR*(R,tbuf((s/usr/lib64/python2.6/gzip.pyt_unreadèscCsv|idjo
td�n|io�|ii�}|iidd�||ii�jo
td�n|ii|�|i�|i�ti ti
�|_ t |_n|ii
|�}|djo3|i i�}|i�|i|�td�n|i i |�}|i|�|i idjo;|iit|i i� dd�|i�t|_ndS(Ns Reached EOFiiRii(R)RRWRttelltseekRERNR"t
decompressobjR%t
decompresstFalseR tflusht _read_eoft_add_read_datat unused_dataRRR(R,R:tposRZt
uncompress((s/usr/lib64/python2.6/gzip.pyRTís0










$
cCs\ti||i�d@|_|i||_|it|�|_|it|�|_dS(Nlÿÿ(R"R8R9RRRRR:(R,RS((s/usr/lib64/python2.6/gzip.pyRcscCs�|iidd�t|i�}t|i�}||ijo)tdt|�t|i�f��n"||id@jo
td�ndS(NiøÿÿÿisCRC check failed %s != %slÿÿs!Incorrect length of data produced(R)R]R R9R(R4R:(R,R8tisize((s/usr/lib64/python2.6/gzip.pyRb%scCsº|idjodS|itjoP|ii|ii��t|i|i�t|i|i d@�d|_n|it
jo
d|_n|i o|i i �d|_ ndS(Nlÿÿ(
R)RRR RR'RaRR9R:RRtclose(R,((s/usr/lib64/python2.6/gzip.pyRh4s



cCsNy)|idjo|idjodSWntj
odSX|i�dS(N(RRR)tAttributeErrorRh(R,((s/usr/lib64/python2.6/gzip.pyt__del__Cs cCsA|itjo-|ii|ii|��|ii�ndS(N(RR R)RR'Ra(R,t zlib_mode((s/usr/lib64/python2.6/gzip.pyRaLscCs
|ii�S(s¥Invoke the underlying file object's fileno() method.

This will raise AttributeError if the underlying file object
doesn't support fileno().
(R)tfileno(R,((s/usr/lib64/python2.6/gzip.pyRlRscCstS(N(R`(R,((s/usr/lib64/python2.6/gzip.pytisattyZscCs|iS(N(R*(R,((s/usr/lib64/python2.6/gzip.pyR\]scCsX|itjotd��n|iid�t|_d|_d|_d|_ dS(s[Return the uncompressed stream file position indicator to the
beginning of the filesCan't rewind in write modeiRN(
RRR(R)R]RRRRR*(R,((s/usr/lib64/python2.6/gzip.pytrewind`s   icCs3|o.|djo|i|}q5td��n|itjor||ijotd��n||i}x)t|d�D]}|idd�q�W|i|dd�ny|itjoh||ijo|i�n||i}x%t|d�D]}|i d�qW|i |d�ndS(NisSeek from end not supportedsNegative seek in write modeiR=(
R*RQRR R(trangeRRRnR (R,R*twhencetcountti((s/usr/lib64/python2.6/gzip.pyR]ks(


cCsS|djoti}|i}n|}g}xä|djoÖ|i|�}|id�}||jp |djo!t|�|jo|d}n|djp
|djo/|i||d �|i||d�Pn|i|�|t|�}t||d�}q2W||ijo t||idd�|_ndi |�S(Nis
iÿÿÿÿiRii(
tsystmaxintRR tfindRRtappendR[RUtjoin(R,R:RXtbufstcRr((s/usr/lib64/python2.6/gzip.pytreadline�s*
 

-
 cCst|djo
ti}ng}xM|djo?|i�}|djoPn|i|�|t|�}q#W|S(NiR(RsRtRzRvRR(R,tsizehinttLtline((s/usr/lib64/python2.6/gzip.pyt readlines s


 

cCs"x|D]}|i|�qWdS(N(R(R,R|R}((s/usr/lib64/python2.6/gzip.pyt
writelines®scCs|S(N((R,((s/usr/lib64/python2.6/gzip.pyt__iter__²scCs"|i�}|o|St�dS(N(Rzt
StopIteration(R,R}((s/usr/lib64/python2.6/gzip.pytnextµs Ni(i (#t__name__t
__module__t__doc__RRRVR-tpropertyR
R7R!R+RERNRR R[RTRcRbRhRjR"t Z_SYNC_FLUSHRaRlRmR\RnR]RzR~RR�R�(((s/usr/lib64/python2.6/gzip.pyR#s<E     "
 2            c
CsÁtid}|o|ddj}|o|d}n|p
dg}nxm|D]e}|o�|djo+tddddd ti�}ti}qF|d
d jod Gt|�GHqTnt|d�}ti|d
d
�}n^|djo+ti}tdddd
d ti�}n&ti|d�}t|d d
�}x4to,|i d�}|pPn|i
|�qIW|tij o|i �n|tij o|i �qTqTWdS(Niis-dt-R
RRR R)iýÿÿÿs.gzsfilename doesn't end in .gz:twbi( RstargvRtstdintstdoutR3RRRR RRh(targsR_targtftgRY((s/usr/lib64/python2.6/gzip.pyt_test½s@




 "t__main__(R�RRsRBR"Rt__all__tFTEXTRIRGR?RHRR RR RRR�R�(((s/usr/lib64/python2.6/gzip.pyt<module>s$   $   ÿ� &