AlkantarClanX12

Your IP : 3.144.90.108


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/chardet/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/chardet/__pycache__/sjisprober.cpython-311.pyc

�

�܋f���z�ddlmZddlmZddlmZddlmZmZddl	m
Z
ddlmZddl
mZGd	�d
e��ZdS)�)�Union�)�SJISDistributionAnalysis)�CodingStateMachine)�MachineState�ProbingState)�SJISContextAnalysis)�MultiByteCharSetProber)�
SJIS_SM_MODELc���eZdZd
�fd�Zd
�fd�Zedefd���Zedefd���Zde	e
efdefd�Z
defd	�Z�xZS)�
SJISProber�returnNc����t�����tt��|_t��|_t��|_|�	��dS�N)
�super�__init__rr�	coding_smr�distribution_analyzerr	�context_analyzer�reset��self�	__class__s ��I/opt/cloudlinux/venv/lib64/python3.11/site-packages/chardet/sjisprober.pyrzSJISProber.__init__'sU���
��������+�M�:�:���%=�%?�%?��"� 3� 5� 5����
�
������c�z��t�����|j���dSr)rrrrs �rrzSJISProber.reset.s/���
���
�
������#�#�%�%�%�%�%rc��|jjSr)r�charset_name�rs rrzSJISProber.charset_name2s���$�1�1rc��dS)N�Japanese�rs r�languagezSJISProber.language6s���zr�byte_strc��|j�J�|j�J�t|��D�]l\}}|j�|��}|tjkr;|j�d|j|j	|��tj|_�n|tj
krtj|_n�|tjkr�|j���}|dkrW||jd<|j�|jd|z
d�|��|j�|j|����|j�||dz|z
|dz|z
�|��|j�||dz
|dz�|����n|d|jd<|jtjkrG|j���r.|���|jkrtj|_|jS)Nz!%s %s prober hit error at byte %srr�����)rr�	enumerate�
next_stater�ERROR�logger�debugrr#r�NOT_ME�_state�ITS_ME�FOUND_IT�START�get_current_charlen�
_last_charr�feed�state�	DETECTING�got_enough_data�get_confidence�SHORTCUT_THRESHOLD)rr$�i�byte�coding_state�char_lens      rr5zSJISProber.feed:s	���~�)�)�)��)�5�5�5� ��*�*�	W�	W�G�A�t��>�4�4�T�:�:�L��|�1�1�1���!�!�7��%��M��	���+�1������|�2�2�2�*�3������|�1�1�1��>�=�=�?�?����6�6�)-�D�O�A�&��)�.�.����H����7������.�3�3�D�O�X�N�N�N�N��)�.�.� ��Q���!1�A��E�H�4D�!D�E�x�����.�3�3�H�Q��U�Q��U�]�4K�X�V�V�V��%�b�\������:��/�/�/��$�4�4�6�6�
4��#�#�%�%��(?�?�?�*�3����z�rc��|j�J�|j���}|j���}t||��Sr)rrr9�max)r�context_conf�distrib_confs   rr9zSJISProber.get_confidencedsI���)�5�5�5��,�;�;�=�=���1�@�@�B�B���<��.�.�.r)rN)�__name__�
__module__�__qualname__rr�property�strrr#r�bytes�	bytearrayrr5�floatr9�
__classcell__)rs@rr
r
&s��������������&�&�&�&�&�&��2�c�2�2�2��X�2���#�����X��(�U�5�)�#3�4�(��(�(�(�(�T/��/�/�/�/�/�/�/�/rr
N)�typingr�chardistributionr�codingstatemachiner�enumsrr�jpcntxr	�mbcharsetproberr
�mbcssmrr
r"rr�<module>rSs���8������6�6�6�6�6�6�2�2�2�2�2�2�-�-�-�-�-�-�-�-�'�'�'�'�'�'�3�3�3�3�3�3�!�!�!�!�!�!�C/�C/�C/�C/�C/�'�C/�C/�C/�C/�C/r