Jz`f}TSrSSKrSSKrSSKr/SQr\\4rSrS:Sjr S;Sjr Sr S r \RS S 5r\RS S 5rS rS rSrSrSrSrSr0r0rSrSS"jr&SSSSS#.S$jr'SSS%S&.S'jr(S(r)Sq*Sq+Sq,S=S)jr-S*r.S+r/S,r0\R\/\0-\)S-\1"\05--5r2\R\)\/5r3S.r4S/r5S0r6\6S1-S2-r7S3r8S4r9S5r:S6r;S7rS9:Xa\="5 gg)?zDBase16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodingsN)encodedecode encodebytes decodebytes b64encode b64decode b32encode b32decode b32hexencode b32hexdecode b16encode b16decode b85encode b85decode a85encode a85decode z85encode z85decodestandard_b64encodestandard_b64decodeurlsafe_b64encodeurlsafe_b64decodecF[U[5(aURS5$[U[ 5(aU$[ U5R5$![a [ S5ef=f![a$ [SURR-5Sef=f)Nasciiz4string argument should contain only ASCII charactersz>argument should be a bytes-like object or ASCII string, not %r) isinstancestrrUnicodeEncodeError ValueError bytes_types memoryviewtobytes TypeError __class____name__ss /usr/lib64/python3.13/base64.py_bytes_from_decode_datar("s!S U88G$ $![!!K!}$$&& " UST T U K)+,;;+?+?@AFJ KKsAA2A/2.B c[R"USS9nUbD[U5S:Xd[U55eUR [ R SU55$U$)aEncode the bytes-like object s using Base64 and return a bytes object. Optional altchars should be a byte string of length 2 which specifies an alternative alphabet for the '+' and '/' characters. This allows an application to e.g. generate url or filesystem safe Base64 strings. F)newline+/)binascii b2a_base64lenrepr translatebytes maketrans)r&altcharsencodeds r'rr3sX!!!U3G8}!14>1!  !ABB NFc[U5nUbO[U5n[U5S:Xd[U55eUR[R US55n[ R"XS9$)aDecode the Base64 encoded bytes-like object or ASCII string s. Optional altchars must be a bytes-like object or ASCII string of length 2 which specifies the alternative alphabet used instead of the '+' and '/' characters. The result is returned as a bytes object. A binascii.Error is raised if s is incorrectly padded. If validate is False (the default), characters that are neither in the normal base-64 alphabet nor the alternative alphabet are discarded prior to the padding check. If validate is True, these non-alphabet characters in the input result in a binascii.Error. For more information about the strict base64 check, see: https://docs.python.org/3.11/library/binascii.html#binascii.a2b_base64 r+r,) strict_mode)r(r/r0r1r2r3r- a2b_base64)r&r4validates r'rrAsc$ "A*848}!14>1! KK%8 9   q 77r6c[U5$)zjEncode bytes-like object s using the standard Base64 alphabet. The result is returned as a bytes object. )rr%s r'rr[s Q<r6c[U5$)a=Decode bytes encoded with the standard Base64 alphabet. Argument s is a bytes-like object or ASCII string to decode. The result is returned as a bytes object. A binascii.Error is raised if the input is incorrectly padded. Characters that are not in the standard alphabet are discarded prior to the padding check. )rr%s r'rrbs Q<r6r,s-_c>[U5R[5$)zEncode bytes using the URL- and filesystem-safe Base64 alphabet. Argument s is a bytes-like object to encode. The result is returned as a bytes object. The alphabet uses '-' instead of '+' and '_' instead of '/'. )rr1_urlsafe_encode_translationr%s r'rrps Q< ! !"= >>r6cX[U5nUR[5n[U5$)aDecode bytes using the URL- and filesystem-safe Base64 alphabet. Argument s is a bytes-like object or ASCII string to decode. The result is returned as a bytes object. A binascii.Error is raised if the input is incorrectly padded. Characters that are not in the URL-safe base-64 alphabet, and are not a plus '+' or slash '/', are discarded prior to the padding check. The alphabet uses '-' instead of '+' and '_' instead of '/'. )r(r1_urlsafe_decode_translationrr%s r'rrys' "A /0A Q<r6zK Encode the bytes-like objects using {encoding} and return a bytes object. a Decode the {encoding} encoded bytes-like object or ASCII string s. Optional casefold is a flag specifying whether a lowercase alphabet is acceptable as input. For security purposes, the default is False. {extra_args} The result is returned as a bytes object. A binascii.Error is raised if the input is incorrectly padded or if there are non-alphabet characters present in the input. a RFC 3548 allows for optional mapping of the digit 0 (zero) to the letter O (oh), and for optional mapping of the digit 1 (one) to either the letter I (eye) or letter L (el). The optional argument map01 when not None, specifies which letter the digit 1 should be mapped to (when map01 is not None, the digit 0 is always mapped to the letter O). For security purposes the default is None, so that 0 and 1 are not allowed in the input. s ABCDEFGHIJKLMNOPQRSTUVWXYZ234567s 0123456789ABCDEFGHIJKLMNOPQRSTUVcU[;aBUVs/sHn[U45PM nnUVVs/sHoCHoTU-PM M snn[U'Sn[U[5(d[ U5R 5n[ U5S-nU(a USSU- --n[5n[Rn[Un [S[ U5S5H8nU"XUS-5n XyU S- XS- S--XS- S--XS--- nM: US:XaS US S&O#US :XaS US S&OUS:XaSUSS&O US:XaSUSS&[U5$s snfs snnf)Nri s======ir+s====s====) _b32tab2r2rrr r!r/ bytearrayint from_bytesrange) alphabetr&ib32tabableftoverr5rQb32tab2cs r' _b32encoder[s}x'/0!%+00-3DD!eDeD a % % qM ! ! #1vzH X& &kGJx G 1c!fa  qAE{ #AG$"W-./"W-./I&' 1}  Q Q Q >;1Ds E EcU[;a&[U5VVs0sHupEXT_M snn[U'[U5n[U5S-(a[R "S5eUbR[U5n[U5S:Xd[ U55eUR[RSSU-55nU(aUR5n[U5nURS5nU[U5- n[5n[Un [S[U5S5H3n XU S-n Sn U H n U S-X-n M XRS5- nM5 US-(dUS ;a[R "S5eU(a3U(a,W SU--n U RS5nS SU-- S-nUSUUS S&[U5$s snnf![a [R "S 5Sef=f) NzIncorrect paddingrGs01OrLrrBzNon-base32 digit found>rrGrIrK+)_b32rev enumerater(r/r-Errorr0r1r2r3upperrstriprOrRKeyErrorto_bytes)rSr&casefoldmap01kvlpadcharsdecodedb32revrTquantaaccrZlastrXs r' _b32decodertsw.7.ABdaQTB"A 1vznn011 '.5zQ+U + KKte|< = GGI AA A3q6zHkG X F 1c!fa #a!e E -ax69, - <<?"# 1u/nn011G H ||AX%!+IX >OC8 E..!9: D Es G1G  "G.c"[[U5$N)r[ _b32alphabetr%s r'r r s lA &&r6base32)encodingc$[[XU5$rv)rtrw)r&rirjs r'r r s lA 77r6)ry extra_argsc"[[U5$rv)r[_b32hexalphabetr%s r'r r s oq ))r6 base32hexc"[[X5$rv)rtr}r&ris r'r r s oq 33r6cJ[R"U5R5$)zKEncode the bytes-like object s using Base16 and return a bytes object. )r-hexlifyrer%s r'r r s   A  $ $ &&r6c[U5nU(aUR5n[R"SU5(a[R "S5e[R "U5$)ajDecode the Base16 encoded bytes-like object or ASCII string s. Optional casefold is a flag specifying whether a lowercase alphabet is acceptable as input. For security purposes, the default is False. The result is returned as a bytes object. A binascii.Error is raised if s is incorrectly padded or if there are non-alphabet characters present in the input. s [^0-9A-F]zNon-base16 digit found)r(reresearchr-rd unhexlifyrs r'rrsN "A GGI yyq!!nn566   a  r6s<~s~>c[U[5(d[U5R5n[ U5*S-nU(aUSU--n[ R "S[ U5S--5RU5nUVs/sH<nU(a U(dSO(U(aUS:XaSOX(S-X(S-S --XS--PM> n nU(a'U(d U S S:Xa US S -U S 'U S SU*U S 'S RU 5$s snf)NrKrCz!%dIzi yi^ Ui9rMrrBr6) rrr r!r/structStructunpackjoin) rWcharschars2padfoldnuls foldspacespaddingwordswordchunkss r' _85encoder.s a % % qM ! ! #Aw!mG   MM&CFaK0 1 8 8 ;E !  td TZ%7dfn%bj4'()BY !!F!s ": qAF2JBZ '*r 88F !sAD)rwrapcolradobecD[cM[SS5Vs/sHn[U45PM snq[VVs/sHn[HoU-PM M snnq[ W[[USU5nU(a [ U-nU(a|[ U(aSOSU5n[S[U5U5Vs/sH nXuXR-PM nnU(a&[US5S-U:aURS5 S RU5nU(a U[- nU$s snfs snnfs snf) aEncode bytes-like object b using Ascii85 and return a bytes object. foldspaces is an optional flag that uses the special short sequence 'y' instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This feature is not supported by the "standard" Adobe encoding. wrapcol controls whether the output should have newline (b'\n') characters added to it. If this is non-zero, each output line will be at most this many characters long, excluding the trailing newline. pad controls whether the input is padded to a multiple of 4 before encoding. Note that the btoa implementation always pads. adobe controls whether the encoded byte sequence is framed with <~ and ~>, which is used by the Adobe implementation. !vTr+rGrrMr6 ) _a85chars2rRr2 _a85charsr _A85STARTmaxr/appendr_A85END) rWrrrrrTrVresultrs r'rrFs(*/C.9QUA4[9 '0D!)DQ1uDuD q)ZdJ GF V#5aa1 CK9;AK(;; 6":"W, c"F# ' M%:D;sDD1Ds )rr ignorecharsc[U5nU(a]UR[5(d[SR [55eUR [ 5(aUSSnOUSSn[R"S5Rn/nURn/nURnURn US-Hn SU s=::aS::aJO OGU"U 5 [U5S :Xa.S n UHn S U -U S- -n M U"U"U 55 U "5 MXMZU S :XaU(a [S5eU"S5 M|U(a"U S:XaU(a [S5eU"S5 MX;aM[SU -5e SRU5n S[U5- n U (aU SU *n U $![Ra [S 5Sef=f)a^Decode the Ascii85 encoded bytes-like object or ASCII string b. foldspaces is a flag that specifies whether the 'y' short sequence should be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature is not supported by the "standard" Adobe encoding. adobe controls whether the input sequence is in Adobe Ascii85 format (i.e. is framed with <~ and ~>). ignorechars should be a byte string containing characters to ignore from the input. This should only contain whitespace characters, and by default contains all whitespace characters in ASCII. The result is returned as a bytes object. z1Ascii85 encoded byte sequences must end with {!r}r+N!IsuuuururBrrzAscii85 overflowzzz inside Ascii85 5-tuplesyzy inside Ascii85 5-tuples zNon-Ascii85 digit found: %cr6rK)r(endswithrrformat startswithrrrpackrclearr/errorr)rWrrrpackIrodecoded_appendcurr curr_append curr_clearxrrrrs r'rros "A zz'"""F7O  << " "!BA#2A MM$  $ $EG^^N D++KJ \@ a "7 " N4yA~.As(a"f-C.C"5:. '\ !;<< ; ' AL !;<< . /   :Q>? ?1@4XXg F#d)mG '" M-||C$%78dBCs >F''!GsU0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~c[cG[Vs/sHn[U45PM snq[VVs/sHn[HoU-PM M snnq[ W[[U5$s snfs snnf)zEncode bytes-like object b in base85 format and return a bytes object. If pad is true, the input is padded with b'\0' so its length is a multiple of 4 bytes before encoding. ) _b85chars2 _b85alphabetr2 _b85charsr)rWrrTrVs r'rrsW*67QUA4[7 '0D!)DQ1uDuD Q :s 338Ds A%A*c[c'S/S-q[[5HupU[U'M [U5n[ U5*S-nUSU--n/n[ R "S5Rn[S[ U5S5H=nXUS-nSnUHnUS-[U-nM URU"U55 M? S RU5n U(aU SU*n U $![a1 [U5H up[UbM[SX--5Se ef=f![ Ra [S U-5Sef=f) ziDecode the base85-encoded bytes-like object or ASCII string b The result is returned as a bytes object. NrB~rrrz#bad base85 character at position %dz+base85 overflow in hunk starting at byte %dr6)_b85decrcrr(r/rrrrRr"rrrr) rWrTrZroutrchunkrrjrs r'rrs&3,l+ DAGAJ  "AAw!mG D7NA C MM$  $ $E 1c!fa ,AE   ,Bh+ , , JJuSz ",$XXc]F '" M !%( 91:%$%J'(u&./489 9   || ,J !"'+ , ,sC*/D(*"D%D%($E sU0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#s;_`|~rCc>[U5R[5$)zCEncode bytes-like object b in z85 format and return a bytes object.)rr1_z85_encode_translationr%s r'rrs Q< ! !"9 ::r6c[U5nUR[5n[U5$![a.n[ UR SR SS55SeSnAff=f)zfDecode the z85-encoded bytes-like object or ASCII string b The result is returned as a bytes object. rbase85z85N)r(r1_z85_decode_translationrrargsreplace)r&es r'rrsa "A +,AG| G**8U;<$FGs - A%)A  A%LrKrIcUR[5=n(a[U5[:aiUR[[U5- 5=n(aAX#- n[U5[:a*UR[[U5- 5=n(aMA[R"U5nUR U5 UR[5=n(aMgg)z1Encode a file; input and output are binary files.N)read MAXBINSIZEr/r-r.write)inputoutputr&nslines r'rrszz*% %! %!fz!UZZ 3q68I-J'Jr'J GA!fz!UZZ 3q68I-J'Jr'J""1% T zz*% %! % %r6cUR5=n(aA[R"U5nURU5 UR5=n(aM@gg)z1Decode a file; input and output are binary files.N)readliner-r9r)rrrr&s r'rrsF.." "$ "    % Q.." "$ " "r6c[U5nURS;a3SUR<SURR<3n[U5eUR S:wa0SUR URR4-n[U5eg![a*nSURR-n[U5UeSnAff=f)Nz"expected bytes-like object, not %s)rZrWBz#expected single byte elements, not z from rGz(expected 1-D data, not %d-D data from %s)r r"r#r$rndim)r&merrmsgs r'_input_type_checkr%s& qM xx&+,88Q[[5I5IKnvv{9+,661;;3G3G*HIn &2Q[[5I5IIn#%&s B C%CCc[U5 /n[S[U5[5H3nXU[-nUR [ R "U55 M5 SRU5$)zREncode a bytestring into a bytes object containing multiple lines of base-64 data.rr6)rrRr/rrr-r.r)r&piecesrTrs r'rr5sca F 1c!fj )2a*n% h))%012 88F r6cD[U5 [R"U5$)z8Decode a bytestring of base-64 data into a bytes object.)rr-r9r%s r'rr@sa   q !!r6cSSKnSSKnSURSS3nURURSSS5up4[nWH<upxUS:Xa[nUS :Xa[nUS :Xa[nUS :XdM1[ U5 g W(a>USS :wa5[USS 5n U"XR R5 SSS5 gU"URRUR R5 g!URaCnURUl[ U5 [ U5 URS5 SnAGN SnAff=f!,(df  g=f)zSmall main programrNzusage: zx [-h|-d|-e|-u] [file|-] -h: print this help message and exit -d, -u: decode -e: encode (default)rGhdeur+z-ez-dz-uz-h-rb) sysgetoptargvrstderrstdoutprintexitrropenbufferstdin) rrusageoptsrrfuncorVfs r'mainrGs0 }% E]]388AB<8  D+ 9Vd 9Vd 9Vd 9eElF +  Q3 $q'4  'A JJ%% & ' ' SYY  szz001 <<ZZ  c  e    ' 's#!C=%E=E 8E  E E!__main__rv)NF)FN)F)FFF)?__doc__rrr-__all__r2rOrr(rrrrr3r>r@rr_B32_ENCODE_DOCSTRING_B32_DECODE_DOCSTRING_B32_DECODE_MAP01_DOCSTRINGrwr}rNrbr[rtr rr r r r rrrrrrrrrrrrrr _z85alphabet_z85_b85_decode_diffr/rrrr MAXLINESIZErrrrrrrr$r6r'rs1K   $i  K" 84$ooeU;#ooeU;? $ 3 5  !F+\')00(0C 8)00(3N1P *,33[3I 4-33[?A4C ' !*    0 %aU%'R %E|DPE    4'RE  //''7S!5666 //, E; G  1na    "26 zFr6