Psyduck - 可達鴨 之 鴨力山大2


Server : LiteSpeed
System : Linux premium217.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User : alloknri ( 880)
PHP Version : 8.1.34
Disable Function : NONE
Directory :  /lib/python3.6/site-packages/chardet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.6/site-packages/chardet/__init__.py
######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################


from .compat import PY2, PY3
from .universaldetector import UniversalDetector
from .version import __version__, VERSION


def detect(byte_str):
    """
    Detect the encoding of the given byte string.

    :param byte_str:     The byte sequence to examine.
    :type byte_str:      ``bytes`` or ``bytearray``
    """
    if not isinstance(byte_str, bytearray):
        if not isinstance(byte_str, bytes):
            raise TypeError('Expected object of type bytes or bytearray, got: '
                            '{0}'.format(type(byte_str)))
        else:
            byte_str = bytearray(byte_str)
    detector = UniversalDetector()
    detector.feed(byte_str)
    return detector.close()
Name
Size
Permissions
Options
__pycache__
--
drwxr-xr-x
cli
--
drwxr-xr-x
__init__.py
1.522 KB
-rw-r--r--
big5freq.py
30.521 KB
-rw-r--r--
big5prober.py
1.716 KB
-rw-r--r--
chardistribution.py
9.19 KB
-rw-r--r--
charsetgroupprober.py
3.698 KB
-rw-r--r--
charsetprober.py
4.99 KB
-rw-r--r--
codingstatemachine.py
3.506 KB
-rw-r--r--
compat.py
1.107 KB
-rw-r--r--
cp949prober.py
1.812 KB
-rw-r--r--
enums.py
1.622 KB
-rw-r--r--
escprober.py
3.857 KB
-rw-r--r--
escsm.py
10.264 KB
-rw-r--r--
eucjpprober.py
3.661 KB
-rw-r--r--
euckrfreq.py
13.229 KB
-rw-r--r--
euckrprober.py
1.707 KB
-rw-r--r--
euctwfreq.py
30.88 KB
-rw-r--r--
euctwprober.py
1.706 KB
-rw-r--r--
gb2312freq.py
20.229 KB
-rw-r--r--
gb2312prober.py
1.713 KB
-rw-r--r--
hebrewprober.py
13.514 KB
-rw-r--r--
jisfreq.py
25.173 KB
-rw-r--r--
jpcntx.py
19.183 KB
-rw-r--r--
langbulgarianmodel.py
12.538 KB
-rw-r--r--
langcyrillicmodel.py
17.527 KB
-rw-r--r--
langgreekmodel.py
12.391 KB
-rw-r--r--
langhebrewmodel.py
11.079 KB
-rw-r--r--
langhungarianmodel.py
12.297 KB
-rw-r--r--
langthaimodel.py
11.025 KB
-rw-r--r--
langturkishmodel.py
10.842 KB
-rw-r--r--
latin1prober.py
5.244 KB
-rw-r--r--
mbcharsetprober.py
3.333 KB
-rw-r--r--
mbcsgroupprober.py
1.965 KB
-rw-r--r--
mbcssm.py
24.884 KB
-rw-r--r--
sbcharsetprober.py
5.524 KB
-rw-r--r--
sbcsgroupprober.py
3.463 KB
-rw-r--r--
sjisprober.py
3.686 KB
-rw-r--r--
universaldetector.py
12.192 KB
-rw-r--r--
utf8prober.py
2.701 KB
-rw-r--r--
version.py
0.236 KB
-rw-r--r--