2 * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
5 * This source code is licensed under the BSD-style license found in the
6 * LICENSE file in the root directory of this source tree. An additional grant
7 * of patent rights can be found in the PATENTS file in the same directory.
10 /* This library is designed for a single-threaded console application.
11 * It exit() and printf() into stderr when it encounters an error condition. */
17 /*-*************************************
19 ***************************************/
20 #define ZDICT_STATIC_LINKING_ONLY
21 #include "zdict.h" /* ZDICT_params_t */
24 /*-*************************************
26 ***************************************/
27 /*! DiB_trainFromFiles() :
28 Train a dictionary from a set of files provided by `fileNamesTable`.
29 Resulting dictionary is written into file `dictFileName`.
30 `parameters` is optional and can be provided with values set to 0, meaning "default".
31 @return : 0 == ok. Any other : error.
33 int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize,
34 const char** fileNamesTable, unsigned nbFiles,
35 ZDICT_params_t *params, COVER_params_t *coverParams,