pub fn is_binary(bytes: &[u8]) -> boolExpand description
Git’s binary heuristic (buffer_is_binary): a NUL byte within the
first BINARY_SNIFF_LEN bytes marks the blob binary, regardless of
UTF-8 validity. bytes may be a full blob or just its leading
BINARY_SNIFF_LEN-byte prefix — since this never looks past that
many bytes, the result is identical either way.