pub fn detect_encoding(bytes: &[u8]) -> FileEncoding
Detect encoding from the leading bytes of a file.