Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reduce threshold for suspicious bytes now that I have utf8 detection.

  • Loading branch information...
commit 50e2c1ee154efe05a2a416c40adcd6e60df845b9 1 parent e0f705d
@ggreer authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/util.c
View
4 src/util.c
@@ -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;
}
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.