+
     Bib                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	 . ROt
Rw  tttttRtRt^t^t^	tRt^]P,                  ,          tR]RRR3R ltR t ! R	 R
4      t ! R R]4      t ! R R]P:                  4      t ! R R]	P>                  4      t R t!R t" ! R R]	PF                  4      t$]3R^ /R llt%R t&R t'](R8X  d
   ]'! 4        R# R# )    N)_streamsBadGzipFileGzipFilerbwbc                    R V9   d   RV9   d   \        RV: 24      hM-Ve   \        R4      hVe   \        R4      hVe   \        R4      hVP                  R R4      p\        V \        \        \
        P                  34      '       d   \        WV4      pM=\        V R4      '       g   \        V R	4      '       d   \        RWbV 4      pM\        R
4      hR V9   d.   \        P                  ! V4      p\        P                  ! WsWE4      # V# )tbzInvalid mode: Nz0Argument 'encoding' not supported in binary modez.Argument 'errors' not supported in binary modez/Argument 'newline' not supported in binary mode readwritez1filename must be a str or bytes object, or a file)
ValueErrorreplace
isinstancestrbytesosPathLiker   hasattr	TypeErroriotext_encodingTextIOWrapper)filenamemodecompresslevelencodingerrorsnewlinegz_modebinary_files   &&&&&&  /usr/lib/python3.14/gzip.pyopenr#   !   s    ( d{$;49::  OPPMNNNOOll3#G(S%566x-@	6	"	"gh&@&@tWXFKLL
d{##H-vGG    c                 R    V P                  \        P                  ! R V4      4       R# )z<LN)r   structpack)outputvalues   &&r"   write32ur*   N   s     LLT5)*r$   c                   F   a  ] tR t^St o RR ltR tRR ltR tR tRt	V t
R# )	_PaddedFilec                L    W n         \        V4      V n        Wn        ^ V n        R# )r   N)_bufferlen_lengthfile_read)selffprepends   &&&r"   __init___PaddedFile.__init__X   s    7|	
r$   c                   V P                   f   V P                  P                  V4      # V P                   V,           V P                  8:  d>   V P                   pV ;P                   V,          un         V P                  W P                    # V P                   pR V n         V P                  VR  V P                  P                  WP                  ,
          V,           4      ,           # N)r2   r1   r   r0   r.   )r3   sizer   s   && r"   r   _PaddedFile.read^   s    ::99>>$''::,::DJJ$J<<ZZ00::DDJ<<&99>>$||"3D"89: :r$   c                    V P                   f   Wn        M$V ;P                   \        V4      ,          un         R # \        V P                  4      V n        ^ V n         R # r9   )r2   r.   r/   r0   )r3   r5   s   &&r"   r5   _PaddedFile.prependk   s=    ::"LJJ#g,&J4<<(
r$   c                T    R V n         R V n        V P                  P                  V4      # r9   )r2   r.   r1   seek)r3   offs   &&r"   r?   _PaddedFile.seekt   s#    
yy~~c""r$   c                    R # T r3   s   &r"   seekable_PaddedFile.seekabley       r$   )r.   r0   r2   r1   N)r$   )__name__
__module____qualname____firstlineno__r6   r   r5   r?   rF   __static_attributes____classdictcell____classdict__s   @r"   r,   r,   S   s#     
:#
 r$   r,   c                       ] tR t^}tRtR# )r   rD   N)rI   rJ   rK   rL   rM   rD   r$   r"   r   r   }   s    r$   c                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )_WriteBufferStreamc                <    \         P                  ! V4      V n        R # r9   )weakrefref	gzip_file)r3   rW   s   &&r"   r6   _WriteBufferStream.__init__   s     Y/r$   c                b    V P                  4       pVf   \        R4      hVP                  V4      # )Nzlost gzip_file)rW   RuntimeError
_write_raw)r3   datarW   s   && r"   r   _WriteBufferStream.write   s1    NN$	/00##D))r$   c                    R # )FrD   rE   s   &r"   rF   _WriteBufferStream.seekable   s    r$   c                    R # rC   rD   rE   s   &r"   writable_WriteBufferStream.writable   rH   r$   )rW   N)
rI   rJ   rK   rL   r6   r   rF   ra   rM   rN   rO   s   @r"   rS   rS      s     0* r$   rS   c                   4  a a ] tR t^t oRtRR]RR3R lt]R 4       tR t	R t
V 3R ltR tR tR	 tR
 tRR ltRR ltR tR tR t]R 4       tR tR t]P2                  3R ltR tR tR tR tR t] PB                  3R lt"RR lt#V 3R lt$Rt%Vt&V ;t'# )r   Nc                   R V n         R V n        R V n        V'       d)   RV9   g   RV9   d   \        RP	                  V4      4      hV'       d   RV9  d
   VR,          p Vf'   \
        P                  ! Y;'       g    R4      ;q@n        Vf-   \        VRR4      p\        V\        \        34      '       g   RpM\        P                  ! V4      pTpVf   \        VRR4      pVP                  R	4      '       d9   \        V n         \!        V4      p\"        P$                  ! V4      V n        Wn        MVP                  R4      '       d   Vf   ^ R IpVP+                  R
\,        ^4       \.        V n         V P1                  V4       \2        P4                  ! V\2        P6                  \2        P8                  ) \2        P:                  ^ 4      V n        WPn        \@        V n!        \"        PD                  ! \G        V 4      V PB                  R7      V n        M\        RP	                  V4      4      hW@n        V P                   \.        8X  d   V PI                  V4       R # R #    T PK                  4        h ; i)Nr	   UzInvalid mode: {!r}r
   r   namer   r   rzGzipFile was opened for writing, but this will change in future Python releases.  Specify the mode argument for opening it for writing.)buffer_size)wax)&r   fileobjr.   r   formatbuiltinsr#   	myfileobjgetattrr   r   r   r   fspath
startswithREAD_GzipReaderr   BufferedReaderrf   warningswarnFutureWarningWRITE_init_writezlibcompressobjDEFLATED	MAX_WBITSDEF_MEM_LEVELcompress_write_mtime_WRITE_BUFFER_SIZE_buffer_sizeBufferedWriterrS   _write_gzip_header_close)	r3   r   r   r   rl   mtimeorigmoderawrv   s	   &&&&&&   r"   r6   GzipFile.__init__   s   J 	SD[C4K188>??CtOCKD2	+3==<<4+PP."7FB7!(S%L99!H99X.H|w5 s## 	!'*!005$	11##MMP &q	*
 "	  * $ 0 01526..151C1C12	!4
 %*!$6!!001CD1I=A=N=N P !!5!<!<T!BCC"LyyE!''6 "	 KKMs   I <A<I 9EI I,c                B    V P                   P                  P                  # r9   )r.   r   _last_mtimerE   s   &r"   r   GzipFile.mtime  s     ||+++r$   c                    \        V P                  4      pR V^R ,           R,           \        \        V 4      4      ,           R,           # )z<gzip  >)reprrl   hexid)r3   ss   & r"   __repr__GzipFile.__repr__  s8    !Ab'!C'#bh-7#==r$   c                    Wn         \        P                  ! R 4      V n        ^ V n        . V n        ^ V n        ^ V n        R# r$   N)rf   r{   crc32crcr:   writebufbufsizeoffset)r3   r   s   &&r"   rz   GzipFile._init_write  s2    	::c?	r$   c                t   < V P                  4        V P                  P                  4        \        SV `  4       # r9   )_check_not_closedr.   flushsupertellr3   	__class__s   &r"   r   GzipFile.tell  s+     w|~r$   c                   V P                   P                  R 4       V P                   P                  R4        \        P                  P	                  V P
                  4      p\        V\        4      '       g   VP                  R4      pVP                  R4      '       d   VRR
 p^ pT'       d   \        pT P                   P                  \        T4      P                  R4      4       T P                  pTf   \        P                  ! 4       p\        T P                   \!        T4      4       T\"        8X  d   RpMT\$        8X  d   RpMRpT P                   P                  T4       T P                   P                  R	4       T'       d%   T P                   P                  TR,           4       R# R#   \         d    Rp ELi ; i)      zlatin-1s   .gzNr$                )rl   r   r   pathbasenamerf   r   r   encodeendswithUnicodeEncodeErrorFNAMEchrr   timer*   int_COMPRESS_LEVEL_BEST_COMPRESS_LEVEL_FAST)r3   r   fnameflagsr   xfls   &&    r"   r   GzipFile._write_gzip_header  sP   ;'7#		 GG$$TYY/EeU++Y/~~f%%cr
 E3u:,,Y78!!=IIKEs5z*00C22CC37#LLuw/ % " 	E	s   A&F- F- -F>=F>c                    V P                  4        V P                  \        8w  d   ^ RIp\	        VP
                  R4      hV P                  f   \        R4      hV P                  P                  V4      # )r   Nz$write() on read-only GzipFile objectz!write() on closed GzipFile object)
r   r   ry   errnoOSErrorEBADFrl   r   r.   r   )r3   r\   r   s   && r"   r   GzipFile.write8  sZ     99%++'MNN<<@AA||!!$''r$   c                   \        V\        \        34      '       d   \        V4      pM\	        V4      pVP
                  pV^ 8  d   V P                  P                  V P                  P                  V4      4       V ;P                  V,          un	        \        P                  ! WP                  4      V n        V ;P                  V,          un        V# )r   )r   r   	bytearrayr/   
memoryviewnbytesrl   r   r   r:   r{   r   r   r   )r3   r\   lengths   && r"   r[   GzipFile._write_rawC  s    dUI.//YF d#D[[FA:LLt}}55d;<IIIzz$1DHKK6!Kr$   c                n    V P                   \        8w  d    ^ RIpV R2p\        VP                  V4      hR# )r   Nz () on write-only GzipFile object)r   rs   r   r   r   )r3   callerr   msgs   &&  r"   _check_readGzipFile._check_readT  s4    99H<=C%++s++ r$   c                z    V P                  4        V P                  R 4       V P                  P                  V4      # )r   )r   r   r.   r   r3   r:   s   &&r"   r   GzipFile.readZ  s1      ||  &&r$   c                    V P                  4        V P                  R 4       V^ 8  d   \        P                  pV P                  P                  V4      # )read1)r   r   r   DEFAULT_BUFFER_SIZEr.   r   r   s   &&r"   r   GzipFile.read1_  sE     	 !!8))D||!!$''r$   c                z    V P                  4        V P                  R 4       V P                  P                  V4      # )readinto)r   r   r.   r   r3   r
   s   &&r"   r   GzipFile.readintoj  s1     $||$$Q''r$   c                z    V P                  4        V P                  R 4       V P                  P                  V4      # )	readinto1)r   r   r.   r   r   s   &&r"   r   GzipFile.readinto1o  s1     %||%%a((r$   c                z    V P                  4        V P                  R 4       V P                  P                  V4      # )peek)r   r   r.   r   )r3   ns   &&r"   r   GzipFile.peekt  s1      ||  ##r$   c                    V P                   R J # r9   )rl   rE   s   &r"   closedGzipFile.closedy  s    ||t##r$   c                @   V P                   pVf   R # V P                  e   V P                  P                  '       d   R #  V P                  \        8X  dv   V P                  P                  4        VP                  V P                  P                  4       4       \        WP                  4       \        WP                  R,          4       M/V P                  \        8X  d   V P                  P                  4        V P                  4        R #   T P                  4        i ; i)N    )rl   r.   r   r   ry   r   r   r   r*   r   r:   rs   closer   )r3   rl   s   & r"   r   GzipFile.close}  s    ,,?<<4<<#6#6#6
	yyE!""$dmm1134((+))j"89d"""$KKMDKKMs    B9D Dc                f    R V n         V P                  pVe   R V n        VP                  4        R # R # r9   )rl   ro   r   )r3   ro   s   & r"   r   GzipFile._close  s.    NN	 !DNOO !r$   c                $   V P                  4        V P                  \        8X  dk   V P                  P	                  4        V P
                  P                  V P                  P	                  V4      4       V P
                  P	                  4        R # R # r9   )r   r   ry   r.   r   rl   r   r   )r3   	zlib_modes   &&r"   r   GzipFile.flush  s`     99LL LLt}}229=>LL 	 r$   c                6    V P                   P                  4       # r9   )rl   filenorE   s   &r"   r   GzipFile.fileno  s     ||""$$r$   c                |    V P                   \        8w  d   \        R 4      hV P                  P	                  ^ 4       R# )zCan't rewind in write modeN)r   rs   r   r.   r?   rE   s   &r"   rewindGzipFile.rewind  s.     99677!r$   c                (    V P                   \        8H  # r9   )r   rs   rE   s   &r"   readableGzipFile.readable  s    yyD  r$   c                (    V P                   \        8H  # r9   )r   ry   rE   s   &r"   ra   GzipFile.writable  s    yyE!!r$   c                    R # rC   rD   rE   s   &r"   rF   GzipFile.seekable  rH   r$   c                   V P                   \        8X  Ed   V P                  4        V P                  P	                  4        V\
        P                  8w  d5   V\
        P                  8X  d   V P                  V,           pM\        R 4      hWP                  8  d   \        R4      hWP                  ,
          pRV P                  ,          p\        W0P                  ,          4       F  pV P                  V4       K  	  V P                  RW0P                  ,          ,          4       V P                  # V P                   \        8X  d,   V P                  4        V P                  P                  W4      # V P                  # )zSeek from end not supportedzNegative seek in write moder   )r   ry   r   r.   r   r   SEEK_SETSEEK_CURr   r   r   r   ranger   rs   r?   )r3   r   whencecountchunkis   &&&   r"   r?   GzipFile.seek  s   99""$LL $R[[(![[61F$%BCC#;<<[[(ED---E5$5$556

5! 7JJu(9(9 9:;
 {{	 YY$""$<<$$V44{{r$   c                X    V P                  4        V P                  P                  V4      # r9   )r   r.   readliner   s   &&r"   r  GzipFile.readline  s#     ||$$T**r$   c                   < V P                   \        8X  d0   V P                  '       g   ^ RIpVP	                  R\
        V ^R7       \        SV `  4        R# )r   Nzunclosed GzipFile)source
stacklevel)r   ry   r   rv   rw   ResourceWarningr   __del__)r3   rv   r   s   & r"   r
  GzipFile.__del__  sB    99dkkkMM-)$1  F 	r$   )r.   r   r   r   r   r   rl   r   ro   rf   r   r:   r   r   )(rI   rJ   rK   rL   ro   r   r6   propertyr   r   rz   r   r   r   r[   r   r   r   r   r   r   r   r   r   r{   Z_SYNC_FLUSHr   r   r   r   ra   rF   r   r   r?   r  r
  rM   rN   __classcell__r   rP   s   @@r"   r   r      s      I $43T`D , ,>
0@	(",'
	((
)
$
 $ $$ ".. !%!" #%++ .+ r$   c                     V P                  V4      p\        V4      V8  d?   V P                  V\        V4      ,
          4      pV'       g   \        R 4      hW#,          pKN  V# )ACompressed file ended before the end-of-stream marker was reached)r   r/   EOFError)fpr   r\   r
   s   &&  r"   _read_exactr    sS     771:D
d)a-GGAD	M" > ? ?	Kr$   c                 t   V P                  ^4      pVR8X  d   R# VR8w  d   \        RV,          4      h\        P                  ! R\	        V ^4      4      w  r#pV^8w  d   \        R4      hV\
        ,          '       d/   \        P                  ! R\	        V ^4      4      w  p\	        W4       V\        ,          '       d%    V P                  ^4      pV'       d
   VR8X  g   K#   V\        ,          '       d%    V P                  ^4      pV'       d
   VR8X  g   K#   V\        ,          '       d   \	        V ^4       V# )	   r$   Nr   zNot a gzipped file (%r)z<BBIxxzUnknown compression methodz<Hr   )	r   r   r&   unpackr  FEXTRAr   FCOMMENTFHCRC)r  magicmethodflag
last_mtime	extra_lenr   s   &      r"   _read_gzip_headerr!    s    
 GGAJE|3e;<<!'xR9K!LV:{677f}}]]4R);<
	B"e||
A7
h
A7
e||Br$   c                   Z   a a ] tR tRt oV 3R ltR tR tR	R ltR tV 3R lt	Rt
VtV ;t# )
rt   i  c                   < \         SV `  \        V4      \        P                  \        P
                  ) R 7       RV n        RV n        R# )wbitsTN)r   r6   r,   r{   _ZlibDecompressorr~   _new_memberr   )r3   r  r   s   &&r"   r6   _GzipReader.__init__  s>    R$*@*@ $ 	 	0  r$   c                J    \         P                  ! R 4      V n        ^ V n        R# r   )r{   r   _crc_stream_sizerE   s   &r"   
_init_read_GzipReader._init_read  s    JJsO	r$   c                H    \        V P                  4      pVf   R# Wn        R# )NFT)r!  _fpr   )r3   r  s   & r"   r!  _GzipReader._read_gzip_header  s"    &txx0
%r$   c                   V^ 8  d   V P                  4       # V'       g   R#  V P                  P                  '       d9   V P                  4        RV n        V P
                  ! R/ V P                  B V n        V P                  '       dA   V P                  4        V P                  4       '       g   V P                  V n
        R# RV n        V P                  P                  '       d<   V P                  P                  \        4      pV P                  P                  W!4      pMV P                  P                  RV4      pV P                  P                   R8w  d0   V P                  P#                  V P                  P                   4       VR8w  d   MXR8X  g   EKv  \%        R4      h\&        P(                  ! W0P*                  4      V n        V ;P,                  \/        V4      ,          un        V ;P                  \/        V4      ,          un	        V# )r   r$   TFr  rD   )readall_decompressoreof	_read_eofr'  _decomp_factory_decomp_argsr,  r!  _pos_sizeneeds_inputr/  r   READ_BUFFER_SIZE
decompressunused_datar5   r  r{   r   r*  r+  r/   )r3   r:   buf
uncompresss   &&  r"   r   _GzipReader.read!  s   !8<<>!
 !!%%%
  #' %)%9%9 &)''&)"  !--//!%DJ#(  !!---hhmm$45!//::3E
!//::3E
!!--4   !3!3!?!?@S cz  B C C JJz995	S_,		S_$	r$   c                   \         P                  ! R \        V P                  ^4      4      w  rWP                  8w  d0   \        R\        V4      : R\        V P                  4      : 24      hW P                  R,          8w  d   \        R4      hRpVR8X  d   V P                  P                  ^4      pK$  V'       d   V P                  P                  V4       R# R# )<IIzCRC check failed z != r   !Incorrect length of data producedr   N)
r&   r  r  r/  r*  r   r   r+  r   r5   )r3   r   isizecs   &   r"   r5  _GzipReader._read_eofV  s    
 }}UK!,DEIISZ=@^M N N((:56ABB
 7la AHHQ r$   c                2   < \         SV `  4        R V n        R# )TN)r   _rewindr'  r   s   &r"   rH  _GzipReader._rewindk  s    r$   )r*  r3  r   r'  r9  r+  r  )rI   rJ   rK   rL   r6   r,  r!  r   r5  rH  rM   rN   r  r  s   @@r"   rt   rt     s)      3j *   r$   rt   r   c                    \         P                  ! W^R7      pVf   \        P                  ! 4       p\        P                  ! RV\        V4      V^,          ^4      pWCR,          ,           # )   )levelr%  z<4sLBB:
   NN)r{   r   r   r&   r'   r   )r\   r   r   	gzip_dataheaders   &&$  r"   r   r   p  sQ     drBI}		 [[9c%j)A,LFcN""r$   c                    . p \         P                  ! V 4      p\        V4      f   RP                  V4      # \        P
                  ! \        P                  ) R7      pVP                  WP                  4       R 4      pVP                  '       d   \        VP                  4      ^8  d   \        R4      h\        P                  ! RVP                  R,          4      w  rVV\        P                  ! V4      8w  d   \!        R4      hV\        V4      R,          8w  d   \!        R	4      hVP#                  V4       VP                  R
,          P%                  R4      p EK[  )TNr$   r$  r  rB  :N   NzCRC check failedr   rC  :rQ  NNr   )r   BytesIOr!  joinr{   decompressobjr~   r<  r   r4  r/   r=  r  r&   r  r   r   appendlstrip)r\   decompressed_membersr  dodecompressedr   r   s   &      r"   r<  r<    s    
ZZR (88011t~~o6}}T'')*%56vvvR^^,q0 0 1 1mmE2>>"+=>$**\**011c,'*45ABB##L1~~b!((1r$   c                     ^ RI Hp  V ! RRR7      pVP                  4       pVP                  RRRR7       VP                  R	RR
R7       VP                  RRRRR7       VP                  RRR.RR7       VP	                  4       p\
        pVP                  '       d   \        pMVP                  '       d   \        pVP                   EF  pVP                  '       d   VR8X  dB   \        RR\        P                  P                  R7      p\        P                   P                  pMVRR R8w  d   \        P"                  ! RV: 24       \%        VR4      p\&        P$                  ! VRR R4      pMsVR8X  dC   \        P                  P                  p\        RR\        P                   P                  VR7      pM*\&        P$                  ! VR4      p\%        VR,           R4      p VP)                  \*        4      pV'       g   MVP-                  V4       K2  V\        P                   P                  Jd   VP/                  4        V\        P                  P                  Jg   EK  VP/                  4        EK  	  R# )r   )ArgumentParserzeA simple command line interface for the gzip module: act like gzip, but do not delete the input file.T)descriptioncolorz--fast
store_truezcompress faster)actionhelpz--bestzcompress betterz-dz--decompresszact like gunzip instead of gzipargs*-r1   )nargsdefaultmetavarr   r   )r   r   rl   Nz.gzzfilename doesn't end in .gz: r   )r   r   rl   r   r   )argparser[  add_mutually_exclusive_groupadd_argument
parse_args_COMPRESS_LEVEL_TRADEOFFfastr   bestr   ra  r<  r   sysstdinbufferstdoutexitr#   rn   r   r;  r   r   )	r[  parsergroupra  r   argr4   gr   s	            r"   mainrw    s   '	,F
 //1E	x;LM	x;LM	t^L>  @ cC5&ID,Myyy,	,yy???czbtSYY=M=MNJJ%%rs8u$HH<SGDEdOMM#cr(D1czII$$btSZZ=N=N+8: MM#t,ud+FF+,EGGENCJJ%%%GGICII$$$GGI5 r$   __main__)r   r   r#   r   r<  )   r     rQ     i   ))rn   r   r   r&   rn  r   rU   r{   compression._commonr   __all__FTEXTr  r  r   r  rs   ry   r   rk  r   r;  r   r   r#   r*   r,   r   r   	RawIOBaserS   
BaseStreamr   r  r!  DecompressReaderrt   r   r<  rw  rI   rD   r$   r"   <module>r     s    	 	  
    (
G(6 %ufeX    ///  ,@tT+Z+
' 'TA' A $Dx"" DL
 "J_ (++ _ D "6 # #"220d zF r$   