faust-streaming / cChardet

universal character encoding detector
Other
53 stars 4 forks source link

cChardet

NOTICE: This is a fork of the original project at https://github.com/PyYoshi/cChardet since the original project is no longer maintained.

To install:

.. code-block:: bash

pip install faust-cchardet

cChardet is high speed universal character encoding detector. - binding to uchardet_.

.. image:: https://badge.fury.io/py/faust-cchardet.svg :target: https://badge.fury.io/py/faust-cchardet :alt: PyPI version

.. image:: https://github.com/faust-streaming/cChardet/workflows/Build%20for%20Linux/badge.svg?branch=master :target: https://github.com/faust-streaming/cChardet/actions?query=workflow%3A%22Build+for+Linux%22 :alt: Build for Linux

.. image:: https://github.com/faust-streaming/cChardet/workflows/Build%20for%20macOS/badge.svg?branch=master :target: https://github.com/faust-streaming/cChardet/actions?query=workflow%3A%22Build+for+macOS%22 :alt: Build for macOS

.. image:: https://github.com/faust-streaming/cChardet/workflows/Build%20for%20windows/badge.svg?branch=master :target: https://github.com/faust-streaming/cChardet/actions?query=workflow%3A%22Build+for+windows%22 :alt: Build for Windows

Supported Languages/Encodings

Example

.. code-block:: python

# -*- coding: utf-8 -*-
import cchardet as chardet
with open(r"src/tests/samples/wikipediaJa_One_Thousand_and_One_Nights_SJIS.txt", "rb") as f:
    msg = f.read()
    result = chardet.detect(msg)
    print(result)

Benchmark

.. code-block:: bash

$ cd src/
$ pip install chardet
$ python tests/bench.py

Results


CPU: Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz

RAM: DDR4-3200 64GB

Platform: Ubuntu 20.04 amd64

Python 3.9.0
^^^^^^^^^^^^

+-----------------+------------------+
|                 | Request (call/s) |
+=================+==================+
| chardet v3.0.4  |       0.46       |
+-----------------+------------------+
| cchardet v2.1.7 |     1404.05      |
+-----------------+------------------+

LICENSE
-------

See **COPYING** file.

Contact
-------

- `Issues`_

.. _uchardet: https://github.com/PyYoshi/uchardet
.. _Issues: https://github.com/PyYoshi/cChardet/issues?page=1&state=open

Platform
--------

Support

Do not Support



- `Anaconda`_
- `pyenv`_

.. _Anaconda: https://www.anaconda.com/
.. _pyenv: https://github.com/pyenv/pyenv