Yann Collet | 4ded9e5 | 2016-08-30 10:04:33 -0700 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. |
| 3 | * All rights reserved. |
| 4 | * |
| 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. |
| 8 | */ |
Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 9 | |
| 10 | /* This library is designed for a single-threaded console application. |
| 11 | * It exit() and printf() into stderr when it encounters an error condition. */ |
| 12 | |
| 13 | #ifndef DIBIO_H_003 |
| 14 | #define DIBIO_H_003 |
| 15 | |
| 16 | |
| 17 | /*-************************************* |
| 18 | * Dependencies |
| 19 | ***************************************/ |
Yann Collet | e69b8cc | 2016-06-04 18:56:23 +0200 | [diff] [blame] | 20 | #define ZDICT_STATIC_LINKING_ONLY |
| 21 | #include "zdict.h" /* ZDICT_params_t */ |
Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 22 | |
| 23 | |
| 24 | /*-************************************* |
| 25 | * Public functions |
| 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. |
| 32 | */ |
| 33 | int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize, |
| 34 | const char** fileNamesTable, unsigned nbFiles, |
Nick Terrell | 5b7fd7c | 2017-06-26 21:07:14 -0700 | [diff] [blame] | 35 | ZDICT_legacy_params_t *params, ZDICT_cover_params_t *coverParams, |
Nick Terrell | df8415c | 2016-12-31 21:08:24 -0800 | [diff] [blame] | 36 | int optimizeCover); |
Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 37 | |
Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 38 | #endif |