Skip to main content

is_binary

Function is_binary 

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

Centralized binary file detection.

Uses a heuristic based on the ratio of non-printable characters in the first 512 bytes.