Skip to content

Commit

Permalink
Reduce threshold for suspicious bytes now that I have utf8 detection.
Browse files Browse the repository at this point in the history
  • Loading branch information
ggreer committed Nov 7, 2012
1 parent e0f705d commit 50e2c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.c
Expand Up @@ -177,7 +177,7 @@ int is_binary(const void* buf, const int buf_len) {
/* Disk IO is so slow that it's worthwhile to do this calculation after every suspicious byte. */
/* This is true even on a 1.6Ghz Atom with an Intel 320 SSD. */
/* Read at least 32 bytes before making a decision */
if (i >= 32 && (suspicious_bytes * 100) / total_bytes > 20) {
if (i >= 32 && (suspicious_bytes * 100) / total_bytes > 10) {
return 1;
}

Expand All @@ -201,7 +201,7 @@ int is_binary(const void* buf, const int buf_len) {
suspicious_bytes++;
}
}
if ((suspicious_bytes * 100) / total_bytes > 20) {
if ((suspicious_bytes * 100) / total_bytes > 10) {
return 1;
}

Expand Down

0 comments on commit 50e2c1e

Please sign in to comment.