Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβ€”the ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβ€”embodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.🌌 SpectraShell

🌌 SpectraShell

Current path: lib64/python2.7/



⬆️ Go up: /lib64

πŸ“„ Viewing: gzip.pyo

οΏ½
zfc@sοΏ½dZddlZddlZddlZddlZddlZddlZddlZddgZddddd	f\Z	Z
ZZZ
ddf\ZZd
οΏ½ZdοΏ½Zdd
dοΏ½ZdejfdοΏ½οΏ½YZdοΏ½ZedkrοΏ½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|jtjd|οΏ½οΏ½dS(Ns<L(twritetstructtpack(toutputtvalue((s/usr/lib64/python2.7/gzip.pytwrite32uscCstjd|jdοΏ½οΏ½dS(Ns<Iii(Rtunpacktread(tinput((s/usr/lib64/python2.7/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.7/gzip.pyRscBseZdZdZd ZddddddοΏ½ZedοΏ½οΏ½ZdοΏ½Z	dοΏ½Z
dοΏ½Zd	οΏ½Zd
οΏ½Z
dοΏ½ZdοΏ½Zd
dοΏ½ZdοΏ½ZddοΏ½ZdοΏ½ZdοΏ½ZedοΏ½οΏ½ZdοΏ½ZejdοΏ½ZdοΏ½ZdοΏ½ZdοΏ½ZdοΏ½ZdοΏ½ZddοΏ½Zd
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	cCsοΏ½|r|jddοΏ½}n|r:d|kr:|d7}n|dkrhtj||pXdοΏ½}|_n|dkrοΏ½t|ddοΏ½}t|tοΏ½sοΏ½|dkrοΏ½d}qοΏ½n|dkrοΏ½t|dοΏ½rοΏ½|j	}qοΏ½d}n|dd	!d
kr3t
|_	t|_d|_
d|_d|_||_d|_nx|dd	!dksY|dd	!d
krοΏ½t|_	|j|οΏ½tj|tjtjtjdοΏ½|_ntd|dοΏ½||_d|_||_|j	tkrοΏ½|jοΏ½ndS(szConstructor 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 include 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 0 to 9 controlling the
        level of compression; 1 is fastest and produces the least compression,
        and 9 is slowest and produces the most compression. 0 is no compression
        at all. The default is 9.

        The mtime argument is an optional numeric timestamp to be written
        to the stream when compressing.  All gzip compressed streams
        are required to contain a timestamp.  If omitted or None, the
        current time is used.  This module ignores the timestamp when
        decompressing; however, some programs, such as gunzip, make use
        of it.  The format of the timestamp is the same as that of the
        return value of time.time() and of the st_mtime member of the
        object returned by os.stat().

        tUttbRtnames<fdopen>RiitridtwtasMode s not supportedN(treplacetNonet__builtin__Rt	myfileobjtgetattrt
isinstancet
basestringthasattrRtREADtTruet_new_membertextrabuft	extrasizet
extrastartRtmin_readsizetWRITEt_init_writetzlibtcompressobjtDEFLATEDt	MAX_WBITSt
DEF_MEM_LEVELtcompresstIOErrortfileobjtoffsettmtimet_write_gzip_header(tselfR
RRR/R1((s/usr/lib64/python2.7/gzip.pyt__init__-sH*
"							&	
				cCsSddl}|jdtdοΏ½|jtkrL|jddkrL|jdS|jS(NiοΏ½οΏ½οΏ½οΏ½suse the name attributeiiοΏ½οΏ½οΏ½οΏ½s.gz(twarningstwarntDeprecationWarningRR&R(R3R5((s/usr/lib64/python2.7/gzip.pyR
οΏ½s
"cCs6t|jοΏ½}d|dd!dtt|οΏ½οΏ½dS(Ns<gzip iiοΏ½οΏ½οΏ½οΏ½t t>(treprR/thextid(R3ts((s/usr/lib64/python2.7/gzip.pyt__repr__οΏ½scCs|jrtdοΏ½οΏ½ndS(sLRaises a ValueError if the underlying file object has been closed.

        sI/O operation on closed file.N(tclosedt
ValueError(R3((s/usr/lib64/python2.7/gzip.pyt
_check_closedοΏ½s	cCs>||_tjdοΏ½d@|_d|_g|_d|_dS(NRlοΏ½οΏ½i(RR(tcrc32tcrctsizetwritebuftbufsize(R3R
((s/usr/lib64/python2.7/gzip.pyR'οΏ½s
			cCs6|jjdοΏ½|jjdοΏ½yVtjj|jοΏ½}t|tοΏ½sY|jdοΏ½}n|j	dοΏ½ru|d }nWnt
k
rοΏ½d}nXd}|rοΏ½t}n|jjt|οΏ½οΏ½|j
}|dkrοΏ½tjοΏ½}nt|jt|οΏ½οΏ½|jjdοΏ½|jjd	οΏ½|r2|jj|d
οΏ½ndS(NsοΏ½sslatin-1s.gziοΏ½οΏ½οΏ½οΏ½RissοΏ½s(R/RtostpathtbasenameRRtstrtencodetendswithtUnicodeEncodeErrortFNAMEtchrR1RttimeRtlong(R3tfnametflagsR1((s/usr/lib64/python2.7/gzip.pyR2οΏ½s,

		cCs#tjdοΏ½d@|_d|_dS(NRlοΏ½οΏ½i(R(RBRCRD(R3((s/usr/lib64/python2.7/gzip.pyt
_init_readοΏ½scCsοΏ½|jjdοΏ½}|dkr*tdοΏ½nt|jjdοΏ½οΏ½}|dkrZtdοΏ½nt|jjdοΏ½οΏ½}t|jοΏ½|_|jjdοΏ½|t@rοΏ½t|jjdοΏ½οΏ½}|dt|jjdοΏ½οΏ½}|jj|οΏ½n|t@r,x6tr(|jjdοΏ½}|s!|dkrοΏ½PqοΏ½qοΏ½Wn|t	@rox6trk|jjdοΏ½}|sd|dkr9Pq9q9Wn|t
@rοΏ½|jjdοΏ½ndS(	NisοΏ½sNot a gzipped fileiisUnknown compression methodis(R/R	R.tordRR1tFEXTRARNR tFCOMMENTtFHCRC(R3tmagictmethodtflagtxlenR=((s/usr/lib64/python2.7/gzip.pyt_read_gzip_headerοΏ½s2
 
	
	
cCsοΏ½|jοΏ½|jtkr:ddl}t|jdοΏ½οΏ½n|jdkrUtdοΏ½nt	|t
οΏ½rs|jοΏ½}nt|οΏ½dkrοΏ½|jj
|jj|οΏ½οΏ½|jt|οΏ½7_tj||jοΏ½d@|_|jt|οΏ½7_nt|οΏ½S(NiοΏ½οΏ½οΏ½οΏ½s$write() on read-only GzipFile objects!write() on closed GzipFile objectilοΏ½οΏ½(RARR&terrnoR.tEBADFR/RR@Rt
memoryviewttobytestlenRR-RDR(RBRCR0(R3tdataR^((s/usr/lib64/python2.7/gzip.pyRοΏ½s
iοΏ½οΏ½οΏ½οΏ½cCsu|jοΏ½|jtkr:ddl}t|jdοΏ½οΏ½n|jdkr\|jdkr\dSd}|dkrοΏ½y4x-t	rοΏ½|j
|οΏ½t|j|dοΏ½}qtWWq.t
k
rοΏ½|j}q.Xnly=x6||jkrοΏ½|j
|οΏ½t|j|dοΏ½}qοΏ½WWn,t
k
r-||jkr.|j}q.nX|j|j}|j|||!}|j||_|j|7_|S(NiοΏ½οΏ½οΏ½οΏ½s$read() on write-only GzipFile objectiRii(RARRR^R.R_R#R/RR t_readtmintmax_read_chunktEOFErrorR0R$R"(R3RDR^treadsizeR0tchunk((s/usr/lib64/python2.7/gzip.pyR	οΏ½s4
	



cCs/t|οΏ½|j|_|jt|οΏ½8_dS(N(RbR#R0(R3tbuf((s/usr/lib64/python2.7/gzip.pyt_unreadscCsl|jdkrtdοΏ½n|jrοΏ½|jjοΏ½}|jjddοΏ½||jjοΏ½krgtdοΏ½n|jj|οΏ½|jοΏ½|jοΏ½tj	tj
οΏ½|_t|_n|jj
|οΏ½}|dkrοΏ½|jjοΏ½}|jοΏ½|j|οΏ½tdοΏ½n|jj|οΏ½}|j|οΏ½|jjdkrh|jjt|jjοΏ½ddοΏ½|jοΏ½t|_ndS(NsReached EOFiiRii(R/RRgR!ttelltseekRTR]R(t
decompressobjR+t
decompresstFalseR	tflusht	_read_eoft_add_read_datatunused_dataRbR (R3RDtposRjt
uncompress((s/usr/lib64/python2.7/gzip.pyRds0	




$
cCs|tj||jοΏ½d@|_|j|j}|j|||_|jt|οΏ½|_|j|_|jt|οΏ½|_dS(NlοΏ½οΏ½(	R(RBRCR0R$R"R#RbRD(R3RcR0((s/usr/lib64/python2.7/gzip.pyRsNscCsοΏ½|jjddοΏ½t|jοΏ½}t|jοΏ½}||jkrhtdt|οΏ½t|jοΏ½fοΏ½οΏ½n||jd@krοΏ½tdοΏ½nd}x"|dkrοΏ½|jjdοΏ½}qοΏ½W|rοΏ½|jjddοΏ½ndS(NiοΏ½οΏ½οΏ½οΏ½isCRC check failed %s != %slοΏ½οΏ½s!Incorrect length of data producedsiοΏ½οΏ½οΏ½οΏ½(R/RmRRCR.R;RDR	(R3RBtisizetc((s/usr/lib64/python2.7/gzip.pyRrVscCs
|jdkS(N(R/R(R3((s/usr/lib64/python2.7/gzip.pyR?nscCsοΏ½|j}|dkrdSd|_zP|jtkrq|j|jjοΏ½οΏ½t||jοΏ½t||j	d@οΏ½nWd|j
}|rοΏ½d|_
|jοΏ½nXdS(NlοΏ½οΏ½(R/RRR&RR-RqRRCRDRtclose(R3R/R((s/usr/lib64/python2.7/gzip.pyRyrs				cCsI|jοΏ½|jtkrE|jj|jj|οΏ½οΏ½|jjοΏ½ndS(N(RARR&R/RR-Rq(R3t	zlib_mode((s/usr/lib64/python2.7/gzip.pyRqοΏ½s
cCs
|jjοΏ½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(R3((s/usr/lib64/python2.7/gzip.pyR{οΏ½scCs_|jtkrtdοΏ½οΏ½n|jjdοΏ½t|_d|_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/RmR R!R"R#R$R0(R3((s/usr/lib64/python2.7/gzip.pytrewindοΏ½s				cCs
|jtkS(N(RR(R3((s/usr/lib64/python2.7/gzip.pytreadableοΏ½scCs
|jtkS(N(RR&(R3((s/usr/lib64/python2.7/gzip.pytwritableοΏ½scCstS(N(R (R3((s/usr/lib64/python2.7/gzip.pytseekableοΏ½sicCs*|r1|dkr"|j|}q1tdοΏ½οΏ½n|jtkrοΏ½||jkr^tdοΏ½οΏ½n||j}x)t|dοΏ½D]}|jddοΏ½q|W|j|ddοΏ½nt|jtkr#||jkrοΏ½|jοΏ½n||j}x%t|dοΏ½D]}|j	dοΏ½qοΏ½W|j	|dοΏ½n|jS(NisSeek from end not supportedsNegative seek in write modeis(
R0R@RR&R.txrangeRRR|R	(R3R0twhencetcountti((s/usr/lib64/python2.7/gzip.pyRmοΏ½s&


cCsοΏ½|dkrοΏ½|j|j}|jjd|οΏ½d}|dkru|j||8_|j||7_|j||!Stj}|j}n|}g}xοΏ½|dkrs|j|οΏ½}|jdοΏ½}||ksοΏ½|dkrοΏ½t	|οΏ½|krοΏ½|d}n|dks|dkr@|j
||d οΏ½|j||dοΏ½Pn|j
|οΏ½|t	|οΏ½}t||dοΏ½}qοΏ½W||jkrοΏ½t||jddοΏ½|_ndj
|οΏ½S(Nis
iiοΏ½οΏ½οΏ½οΏ½Rii(R0R$R"tfindR#tsystmaxintR%R	RbtappendRkRetjoin(R3RDR0RοΏ½RhtbufsRx((s/usr/lib64/python2.7/gzip.pytreadlineοΏ½s4	*

Ni(iοΏ½(!t__name__t
__module__t__doc__RRRfR4tpropertyR
R>RAR'R2RTR]RR	RkRdRsRrR?RyR(tZ_SYNC_FLUSHRqR{R|R}R~RRmRοΏ½(((s/usr/lib64/python2.7/gzip.pyR$s8[						!	!	2								cCsοΏ½tjd}|o |ddk}|r6|d}n|sHdg}nx]|D]U}|rοΏ½|dkrοΏ½tddddd	tjοΏ½}tj}q9|d
dkrοΏ½dGt|οΏ½GHqOnt|dοΏ½}tj|d
 d
οΏ½}n[|dkrtj}tdddd
d	tjοΏ½}n%tj|dοΏ½}t|dd
οΏ½}x0trk|j	dοΏ½}|s[Pn|j
|οΏ½q<W|tjk	rοΏ½|jοΏ½n|tjk	rO|jοΏ½qOqOWdS(Niis-dt-R
RRRR/iοΏ½οΏ½οΏ½οΏ½s.gzsfilename doesn't end in .gz:twbi(RοΏ½targvRtstdintstdoutR:RRR R	RRy(targsRotargtftgRi((s/usr/lib64/python2.7/gzip.pyt_testοΏ½s<


	!	
t__main__(RοΏ½RRοΏ½RPRGR(tioRt__all__tFTEXTRXRVRNRWRR&RRRtBufferedIOBaseRRοΏ½RοΏ½(((s/usr/lib64/python2.7/gzip.pyt<module>s0$			οΏ½οΏ½	&


πŸ“