KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/task/21573/root/proc/21572/root/usr/lib64/python2.4/gzip.pyo
mò
‚=5Dc@sédZdkZdkZdkZdkZdkZddgZdddddf\ZZZ	Z
Zddf\ZZ
d	„Zd
„Zd„Zd„Zd
„Zddd„Zdfd„ƒYZd„Zedjoeƒ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.NtGzipFiletopeniiiiicCs#|djo|dd>7}n|S(s‹Return i as an unsigned integer, assuming it fits in 32 bits.

    If it's >= 2GB when viewed as a 32-bit unsigned int, return a long.
    ili N(ti(R((t/usr/lib64/python2.4/gzip.pytU32s
cCs|d@S(s>Return the low-order 32 bits of an int, as a non-negative int.lÿÿN(R(R((RtLOWU32scCs|itid|ƒƒdS(Ns<l(toutputtwritetstructtpacktvalue(RR
((Rtwrite32scCs|itid|ƒƒdS(Ns<L(RRRR	R
(RR
((Rtwrite32u"scCstid|idƒƒdS(Ns<lii(Rtunpacktinputtread(R((Rtread32'strbi	cCst|||ƒS(sŸShorthand for GzipFile(filename, mode, compresslevel).

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

    N(Rtfilenametmodet
compresslevel(RRR((RR*scBstZdZeZdddZeeded„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zdd„Z
d
„Zdd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Zdd„Zd„Zd„Zd„ZRS(sˆThe GzipFile class simulates most of the methods of a file object with
    the exception of the readinto() and truncate() methods.

    i
ii	cCs¯|od|jo|d7}n|d
jo$ti||pdƒ}|_n|d
jo't|dƒo
|i	}q‡d}n|d
jo't|dƒo
|i}q»d}n|dd!djo1t
|_t|_d|_
d|_||_n||dd!d	jp|dd!d
joBt|_|i|ƒti|tititidƒ|_ntd|d‚||_d|_|itjo|iƒnd
S(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.

        tbRtnametRiitrtwtasMode s not supportedN(RtfileobjtNonet__builtin__RRtselft	myfileobjthasattrRtREADtTruet_new_membertextrabuft	extrasizetWRITEt_init_writetzlibtcompressobjRtDEFLATEDt	MAX_WBITSt
DEF_MEM_LEVELtcompresstIOErrortoffsett_write_gzip_header(RRRRR((Rt__init__<s@
$





				
(	
			cCs6t|iƒ}d|dd!dtt|ƒƒdS(Ns<gzip iiÿÿÿÿt t>(treprRRtsthextid(RR5((Rt__repr__€scCsY|ddjo|d}n||_tidƒ|_d|_g|_d|_dS(Niýÿÿÿs.gzRi(RRR(tcrc32tcrctsizetwritebuftbufsize(RR((RR'„s			cCs¹|iidƒ|iidƒ|id }d}|o
t}n|iit|ƒƒt|it	t
i
ƒƒƒ|iidƒ|iidƒ|o|ii|dƒndS(Ns‹siýÿÿÿissÿt(RRRRtfnametflagstFNAMEtchrRtlongttime(RR?R@((RR0s

cCstidƒ|_d|_dS(NRi(R(R9RR:R;(R((Rt
_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>(RRRtmagicR.tordtmethodtflagtFEXTRAtxlenRAR"R5tFCOMMENTtFHCRC(RRFR5RKRIRH((Rt_read_gzip_headerŸs4



 cCsÆ|itjodk}t|idƒ‚n|idjo
td‚nt	|ƒdjoc|it	|ƒ|_ti
||iƒ|_|ii|ii|ƒƒ|it	|ƒ7_ndS(Ns$write() on read-only GzipFile objects!write() on closed GzipFile objecti(RRR&terrnoR.tEBADFRRt
ValueErrortlentdataR;R(R9R:RR-R/(RRSRO((RRÁs	
iÿÿÿÿcCsu|itjodk}t|idƒ‚n|idjo|idjodSnd}|djoYy6x/to'|i|ƒt
|i|dƒ}qpWWq5tj
o|i}q5Xnsy?x8||ijo'|i|ƒt
|i|dƒ}qÉWWn0tj
o$||ijo
|i}q5nX|i| }|i||_|i||_|i|7_|S(Ns$read() on write-only GzipFile objectiRii(RRR!ROR.RPR%RRtreadsizeR;R"t_readtmintmax_read_chunktEOFErrorR$tchunkR/(RR;RORTRY((RRÎs6	 



cCs?||i|_t|ƒ|i|_|it|ƒ8_dS(N(tbufRR$RRR%R/(RRZ((Rt_unreadîscCsv|idjo
td‚n|ioŒ|iiƒ}|iiddƒ||iiƒjo
td‚n|ii|ƒ|iƒ|i	ƒt
it
iƒ|_
t|_n|ii|ƒ}|djo3|i
iƒ}|iƒ|i|ƒtd‚n|i
i
|ƒ}|i|ƒ|i
idjo;|iit|i
iƒddƒ|iƒt|_ndS(NsReached EOFiiRii(RRRRXR#ttelltpostseekRERNR(t
decompressobjR+t
decompresstFalseRR;RZtflusht
uncompresst	_read_eoft_add_read_datatunused_dataRRR"(RR;RcR]RZ((RRUós0










$
cCsXti||iƒ|_|i||_|it|ƒ|_|it|ƒ|_dS(N(	R(R9RSRR:R$R%RRR;(RRS((RRe%scCs‡|iiddƒt|iƒ}tt|iƒƒ}t|ƒt|iƒjo
td‚n$|t	|i
ƒjo
td‚ndS(NiøÿÿÿisCRC check faileds!Incorrect length of data produced(RRR^RR9RtisizeR:R.RR;(RR9Rg((RRd+s
cCs§|itjoR|ii|iiƒƒt|i|iƒt	|it
|iƒƒd|_n|it
jo
d|_n|io|iiƒd|_ndS(N(RRR&RRR-RbRR:RRR;RR!Rtclose(R((RRh9s



cCsTy,|idjo|idjodSnWntj
odSnX|iƒdS(N(RRRRtAttributeErrorRh(R((Rt__del__Fs 	cCs|iiƒdS(N(RRRb(R((RRbOscCs
|iiƒS(s¥Invoke the underlying file object's fileno() method.

        This will raise AttributeError if the underlying file object
        doesn't support fileno().
        N(RRtfileno(R((RRkRscCstS(N(Ra(R((RtisattyZscCs|iS(N(RR/(R((RR\]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.RR^R"R#R$R%R/(R((Rtrewind`s			cCsþ|itjor||ijotdƒ‚n||i}x)t|dƒD]}|iddƒqNW|i|ddƒny|it	joh||ijo|i
ƒn||i}x%t|dƒD]}|idƒqÎW|i|dƒndS(NsNegative seek in write modeiR>(RRR&R/R.tcounttrangeRRR!RmR(RR/RnR((RR^ks 

cCs]|djo
ti}ng}td|ƒ}x'to|djodi|ƒSn|i	|ƒ}|idƒ}|dj	oM|djo!t|ƒ|jo|d}qÏ||jo|d}qÏn|djp
|djo;|i||d ƒ|i||dƒdi|ƒSn|i|ƒ|t|ƒ}t||dƒ}q2WdS(NiidRs
iÿÿÿÿii(R;tsystmaxinttbufsRVRTR"tjoinRRtctfindRRRRtappendR[(RR;RtRRTRr((Rtreadline|s,



 

icCst|djo
ti}ng}xM|djo?|iƒ}|djoPn|i|ƒ|t|ƒ}q#W|S(NiR(	tsizehintRpRqtLRRwtlineRvRR(RRxRyRz((Rt	readlines˜s




cCs"x|D]}|i|ƒqWdS(N(RyRzRR(RRyRz((Rt
writelines¦scCs|S(N(R(R((Rt__iter__ªscCs%|iƒ}|o|Snt‚dS(N(RRwRzt
StopIteration(RRz((Rtnext­s(t__name__t
__module__t__doc__RRRWR1R8R'R0RERNRRR[RUReRdRhRjRbRkRlR\RmR^RwR{R|R}R(((RR3s8D						"	
 	2			
										cCsÁtid}|o|ddj}|o|d}n|p
dg}nxm|D]e}|oˆ|djo+tddddd	tiƒ}ti}qF|d
djodGt
|ƒGHqTnt|dƒ}ti|d
 d
ƒ}n^|djo+ti}tdddd
d	tiƒ}n&ti|dƒ}t|dd
ƒ}x4t
o,|idƒ}|pPn|i|ƒqIW|tij	o|iƒn|tij	o|iƒqTqTWdS(Niis-dt-RRRRRiýÿÿÿs.gzsfilename doesn't end in .gz:twbi(RptargvtargsR`targRtstdintftstdouttgR4RRR"RRYRRh(R‹R‰RYR†R`R‡((Rt_testµs@




	"t__main__(R‚RRpRDR(Rt__all__tFTEXTRMRJRARLR!R&RRRRRRRRŒR€(RAR!RŒRRRRMRRRRŽRRR&RJRLRpR(RRDR((Rt?s"		$							ÿƒ	&


Anon7 - 2021