]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Update minimal training sample size
authorJennifer Liu <jenniferliu620@fb.com>
Tue, 3 Jul 2018 19:07:06 +0000 (12:07 -0700)
committerJennifer Liu <jenniferliu620@fb.com>
Tue, 3 Jul 2018 19:07:06 +0000 (12:07 -0700)
lib/dictBuilder/cover.c

index a3195aa77ca08449e316a62b1d13e098d5dbcc28..1fe8d89eedf4bf42a3533d834287dc77f4c19a0e 100644 (file)
@@ -555,8 +555,8 @@ static int COVER_ctx_init(COVER_ctx_t *ctx, const void *samplesBuffer,
                  (U32)(totalSamplesSize>>20), (COVER_MAX_SAMPLES_SIZE >> 20));
     return 0;
   }
-  /* Check if there's training sample */
-  if (nbTrainSamples < 1) {
+  /* Check if there are at least 5 training samples */
+  if (nbTrainSamples < 5) {
     DISPLAYLEVEL(1, "Total number of training samples is %u and is invalid.", nbTrainSamples);
     return 0;
   }