points
How does the chardet achieve this? Explain in detail, with shortened code excerpts from the library itself if helpful to the explanation.
The prompt is explicitly requesting the source!