Skip to main content

is_binary

Function is_binary 

Source
pub fn is_binary(bytes: &[u8]) -> bool
Expand description

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”.