Exit loop earlier for bsdiff's pathological case

Looking at bsdiff's comment, original author want to generate a diff
patch only if diff is no smaller than 8 bytes. Actual code only only
permits the diff to be generated if diff > 8 bytes.

Partners reported a pair of problematic files where BSDIFF takes more
than 10 hours(input file is only ~80MB). After applying this patch,
bsdiff takes ~1 minute.

To make sure this patch does not harm patch size for non-pathological
cases, I tested multiple pixel OTAs. Total OTA size increased by just
0.002% . Basically negligible.

Test: Multiple pixle OTAs
Bug: 285271992

Change-Id: I2a9b52939f8d17ea48dc2908942b2cc21cbe4e09
diff --git a/bsdiff.cc b/bsdiff.cc
index 8bb21b7..a1112d5 100644
--- a/bsdiff.cc
+++ b/bsdiff.cc
@@ -119,7 +119,7 @@
 					oldscore++;
 
 			if(((len==oldscore) && (len!=0)) ||
-				(len>oldscore+8 && len>=min_length)) break;
+				(len>=oldscore+8 && len>=min_length)) break;
 
 			if((scan+lastoffset<oldsize) &&
 				(old_buf[scan+lastoffset] == new_buf[scan]))
diff --git a/patch_writer.cc b/patch_writer.cc
index b7d9b08..83bc531 100644
--- a/patch_writer.cc
+++ b/patch_writer.cc
@@ -13,10 +13,6 @@
 #include "bsdiff/control_entry.h"
 #include "bsdiff/logging.h"
 
-namespace {
-
-
-}  // namespace
 
 namespace bsdiff {
 
@@ -43,6 +39,7 @@
     LOG(ERROR) << "Patch writer expects at least one compressor.";
     return false;
   }
+  compressor_list->clear();
 
   for (const auto& type : types_) {
     switch (type) {