2bi9!BSSKJrJr SSKJr SSKJr "SS\5rg))ListUnion) CharSetProber) ProbingStatec>^\rSrSrSrSrSrSU4SjjrSU4Sjjr\ S\ 4S j5r \ S\ 4S j5r S\ 4S jrS\ 4S jrS\4S jrS\4SjrS\4SjrS\4SjrS\\SS4SjrS\\SS4SjrS\\\4S\4Sjr\ S\4Sj5rS\ 4SjrSr U=r!$) UTF1632ProberaL This class simply looks for occurrences of zero bytes, and infers whether the file is UTF16 or UTF32 (low-endian or big-endian) For instance, files looking like ( [nonzero] )+ have a good probability to be UTF32BE. Files looking like ( [nonzero] )+ may be guessed to be UTF16BE, and inversely for little-endian varieties. gGz?returnNc >[TU]5 SUlS/S-UlS/S-Ul[ R Ul/SQUlSUl SUl SUl SUl SUl SUlUR5 g)NrrrrrF)super__init__position zeros_at_modnonzeros_at_modr DETECTING_statequadinvalid_utf16beinvalid_utf16leinvalid_utf32beinvalid_utf32le'first_half_surrogate_pair_detected_16be'first_half_surrogate_pair_detected_16leresetself __class__s ړ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/chardet/utf1632prober.pyrUTF1632Prober.__init__)s~  C!G !sQw",,   $$$$7<47<4 c>[TU]5 SUlS/S-UlS/S-Ul[ R UlSUlSUl SUl SUl SUl SUl /SQUlg)NrrFr)rrrrrrrrrrrrrrrrs r"rUTF1632Prober.reset8ss   C!G !sQw",, $$$$7<47<4  r$cUR5(agUR5(agUR5(agUR5(agg)Nzutf-32bezutf-32lezutf-16bezutf-16lezutf-16)is_likely_utf32beis_likely_utf32leis_likely_utf16beis_likely_utf16ler s r" charset_nameUTF1632Prober.charset_nameFsM  ! ! # #  ! ! # #  ! ! # #  ! ! # #r$cg)Nr,s r"languageUTF1632Prober.languageSsr$c4[SURS- 5$)N?g@maxrr,s r"approx_32bit_chars UTF1632Prober.approx_32bit_charsW3 +,,r$c4[SURS- 5$)Nr5g@r6r,s r"approx_16bit_chars UTF1632Prober.approx_16bit_charsZr:r$cUR5nXR:=(a URSU- UR:=(a URSU- UR:=(a] URSU- UR:=(a7 URSU- UR:=(a UR (+$Nrr)r8MIN_CHARS_FOR_DETECTIONrEXPECTED_RATIOrrr approx_charss r"r(UTF1632Prober.is_likely_utf32be]s..0 ;;;   a < /$2E2E E )!!!$|3d6I6II )!!!$|3d6I6II )$$Q',69L9LL )(((  r$cUR5nXR:=(a URSU- UR:=(a URSU- UR:=(a] URSU- UR:=(a7 URSU- UR:=(a UR (+$r?)r8rBrrCrrrDs r"r)UTF1632Prober.is_likely_utf32legs..0 ;;;   #l 2T5H5H H )!!!$|3d6I6II )!!!$|3d6I6II )!!!$|3d6I6II )(((  r$cFUR5nXR:=(a} URSURS-U- UR:=(aG URSURS-U- UR:=(a UR (+$)NrrArr@)r<rBrrCrrrDs r"r*UTF1632Prober.is_likely_utf16beq..0 ;;;  ! !! $t';';A'> >, N!! " )""1%(9(9!(<< L!!" )(((  r$cFUR5nXR:=(a} URSURS-U- UR:=(aG URSURS-U- UR:=(a UR (+$)Nrr@rrA)r<rBrrCrrrDs r"r+UTF1632Prober.is_likely_utf16le{rKr$rcUSS:wd.USS:d%USS:Xa#USS:XaSUSs=::aS::a O OSUlUSS:wd.USS:d%USS:Xa&USS:XaSUSs=::aS::a O g SUlg g g g ) z Validate if the quad of bytes is valid UTF-32. UTF-32 is valid in the range 0x00000000 - 0x0010FFFF excluding 0x0000D800 - 0x0000DFFF https://en.wikipedia.org/wiki/UTF-32 rrr@TrAN)rr)r rs r"validate_utf32_characters'UTF1632Prober.validate_utf32_characterss GqLAw~Q1 aA$$q'2IT2I#'D GqLAw~Q1 aA$$q'2IT2I#'D 3J r$paircUR(d6SUSs=::aS::a O OSUlO=SUSs=::aS::a O O*SUlO"SUSs=::aS::a O OSUlOSUlUR(d7SUSs=::aS::a O OSUlg SUSs=::aS::a O g SUlg g SUSs=::aS::a O OSUlg SUlg ) a  Validate if the pair of bytes is valid UTF-16. UTF-16 is valid in the range 0x0000 - 0xFFFF excluding 0xD800 - 0xFFFF with an exception for surrogate pairs, which must be in the range 0xD800-0xDBFF followed by 0xDC00-0xDFFF https://en.wikipedia.org/wiki/UTF-16 rPrTrQFrN)rrrr)r rTs r"validate_utf16_characters'UTF1632Prober.validate_utf16_characterss;;tAw&$&?C<a(D('+$tAw&$&?D<'+$;;tAw&$&?C<a(D('+$)tAw&$&?D<'+$r$byte_strcUHnURS-nX RU'US:XaWURUR5 URURSS5 URURSS5 US:XaURU==S- ss'OUR U==S- ss'U=RS- slM UR $)NrrArr@r)rrrRrXrrstate)r rZcmod4s r"feedUTF1632Prober.feedsA==1$DIIdOqy..tyy9..tyy1~>..tyy1~>Av!!$'1,'$$T*a/* MMQ Mzzr$cBUR[R[R1;a UR$UR 5S:a![RUlUR$UR S:a[RUlUR$)Ng?i)rrNOT_MEFOUND_ITget_confidencerr,s r"r\UTF1632Prober.statesz ;;<.. 0E0EF F;;     4 '&//DK {{ ]]X %'--DK{{r$cUR5(d?UR5(d*UR5(dUR5(aS$S$)Ng333333?g)r+r*r)r(r,s r"rdUTF1632Prober.get_confidencesT&&(())++))++))++   r$) rrrrrrrrrrr)r N)"__name__ __module__ __qualname____firstlineno____doc__rBrCrrpropertystrr-r2floatr8r<boolr(r)r*r+rintrRrXrbytes bytearrayrr_r\rd__static_attributes__ __classcell__)r!s@r"r r s!N  ! c  #-E--E- 4  4  4  4 (d3i(D(,,d3i,D,@ U5)#34   |       r$r N)typingrr charsetproberrenumsrr r1r$r"rys*(F MF r$