pub fn is_binary(data: &[u8]) -> boolExpand description
Centralized binary file detection.
Uses a heuristic based on the ratio of non-text bytes in the first 512 bytes. Valid UTF-8 multi-byte sequences (2-4 bytes) are counted as text, not binary, so files containing emoji or CJK characters are not falsely flagged.