]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added warning message (too few samples)
authorYann Collet <yann.collet.73@gmail.com>
Fri, 29 Jan 2016 14:25:11 +0000 (15:25 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Fri, 29 Jan 2016 14:25:11 +0000 (15:25 +0100)
dictBuilder/dibcli.c

index 121620943802d1f7f1e33de2529ff421e6b0022a..f91c3cbe53127a2abcec8ac50f2488b05d02690d 100644 (file)
@@ -228,7 +228,14 @@ int main(int argCount, const char** argv)
     /* Welcome message (if verbose) */
     DISPLAYLEVEL(3, WELCOME_MESSAGE);
 
+    /* check nb files */
     if (filenameIdx==0) return badusage(programName);
+    if (filenameIdx < 100)
+    {
+        DISPLAYLEVEL(2, "Warning : set contains only %u files ... \n", filenameIdx);
+        DISPLAYLEVEL(3, "!! For better results, consider providing > 1.000 samples     !!\n");
+        DISPLAYLEVEL(3, "!! Each sample should preferably be stored as a separate file !!\n");
+    }
 
     /* building ... */
     DiB_setNotificationLevel(g_displayLevel);