Improve detect encoding speed, for example by using [python-magic](https://github.com/ahupp/python-magic).
Improve detect encoding speed, for example by using python-magic.