pub fn is_binary(bytes: &[u8]) -> bool
A file is treated as binary if it contains a NUL byte — the same heuristic git uses to decide whether to print a textual diff or “Binary files differ”.