Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/chardet/__pycache__/

[FILE] big5freq.cpython-310.pyc [ edit | delete | rename ]
[FILE] big5prober.cpython-310.pyc [ edit | delete | rename ]
[FILE] chardistribution.cpython-310.pyc [ edit | delete | rename ]
[FILE] charsetgroupprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] charsetprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] codingstatemachine.cpython-310.pyc [ edit | delete | rename ]
[FILE] compat.cpython-310.pyc [ edit | delete | rename ]
[FILE] cp949prober.cpython-310.pyc [ edit | delete | rename ]
[FILE] enums.cpython-310.pyc [ edit | delete | rename ]
[FILE] escprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] escsm.cpython-310.pyc [ edit | delete | rename ]
[FILE] eucjpprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] euckrfreq.cpython-310.pyc [ edit | delete | rename ]
[FILE] euckrprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] euctwfreq.cpython-310.pyc [ edit | delete | rename ]
[FILE] euctwprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] gb2312freq.cpython-310.pyc [ edit | delete | rename ]
[FILE] gb2312prober.cpython-310.pyc [ edit | delete | rename ]
[FILE] hebrewprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] jisfreq.cpython-310.pyc [ edit | delete | rename ]
[FILE] jpcntx.cpython-310.pyc [ edit | delete | rename ]
[FILE] langbulgarianmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langgreekmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langhebrewmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langhungarianmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langrussianmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langthaimodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] langturkishmodel.cpython-310.pyc [ edit | delete | rename ]
[FILE] latin1prober.cpython-310.pyc [ edit | delete | rename ]
[FILE] mbcharsetprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] mbcsgroupprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] mbcssm.cpython-310.pyc [ edit | delete | rename ]
[FILE] sbcharsetprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] sbcsgroupprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] sjisprober.cpython-310.pyc [ edit | delete | rename ]
[FILE] universaldetector.cpython-310.pyc [ edit | delete | rename ]
[FILE] utf8prober.cpython-310.pyc [ edit | delete | rename ]
[FILE] version.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/chardet/__pycache__/__init__.cpython-310.pyc

o

�n�_��@sDddlmZddlmZddlmZmZgd�Zdd�Zdd�Z	d	S)
�)�UniversalDetector)�
InputState)�__version__�VERSION)r�detect�
detect_allrrcCsFt|t�st|t�std�t|����t|�}t�}|�|�|��S)z�
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    �3Expected object of type bytes or bytearray, got: {})	�
isinstance�	bytearray�bytes�	TypeError�format�typer�feed�close)�byte_str�detector�r�2/usr/lib/python3/dist-packages/chardet/__init__.pyrs


�
rcCs�t|t�st|t�std�t|����t|�}t�}|�|�|��|j	t
jkrig}|jD],}|�
�|jkrZ|j}|j��}|�d�rN|jrN|j�||�}|�||�
�|jd��q.t|�dkrit|dd�d�S|jgS)z�
    Detect all the possible encodings of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    rziso-8859)�encoding�
confidence�language�cSs
|dS)Nrr)�resultrrr�<lambda>Qs
zdetect_all.<locals>.<lambda>)�key)r	r
rrr
rrrr�_input_stater�	HIGH_BYTE�_charset_probers�get_confidence�MINIMUM_THRESHOLD�charset_name�lower�
startswith�_has_win_bytes�ISO_WIN_MAP�get�appendr�len�sortedr)rr�results�proberr!�lower_charset_namerrrr-s:


�



���rN)
�universaldetectorr�enumsr�versionrr�__all__rrrrrr�<module>s
Upload File: