| Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 1 | /* |
| 2 | dibio.h - I/O API for dictionary builder |
| 3 | Copyright (C) Yann Collet 2016 |
| 4 | |
| 5 | GPL v2 License |
| 6 | |
| 7 | This program is free software; you can redistribute it and/or modify |
| 8 | it under the terms of the GNU General Public License as published by |
| 9 | the Free Software Foundation; either version 2 of the License, or |
| 10 | (at your option) any later version. |
| 11 | |
| 12 | This program is distributed in the hope that it will be useful, |
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | GNU General Public License for more details. |
| 16 | |
| 17 | You should have received a copy of the GNU General Public License along |
| 18 | with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | |
| 21 | You can contact the author at : |
| 22 | - zstd homepage : http://www.zstd.net/ |
| 23 | */ |
| 24 | |
| 25 | /* This library is designed for a single-threaded console application. |
| 26 | * It exit() and printf() into stderr when it encounters an error condition. */ |
| 27 | |
| 28 | #ifndef DIBIO_H_003 |
| 29 | #define DIBIO_H_003 |
| 30 | |
| 31 | |
| 32 | /*-************************************* |
| 33 | * Dependencies |
| 34 | ***************************************/ |
| Yann Collet | e69b8cc | 2016-06-04 18:56:23 +0200 | [diff] [blame] | 35 | #define ZDICT_STATIC_LINKING_ONLY |
| 36 | #include "zdict.h" /* ZDICT_params_t */ |
| Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 37 | |
| 38 | |
| 39 | /*-************************************* |
| 40 | * Public functions |
| 41 | ***************************************/ |
| 42 | /*! DiB_trainFromFiles() : |
| 43 | Train a dictionary from a set of files provided by `fileNamesTable`. |
| 44 | Resulting dictionary is written into file `dictFileName`. |
| 45 | `parameters` is optional and can be provided with values set to 0, meaning "default". |
| 46 | @return : 0 == ok. Any other : error. |
| 47 | */ |
| 48 | int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize, |
| 49 | const char** fileNamesTable, unsigned nbFiles, |
| 50 | ZDICT_params_t parameters); |
| 51 | |
| 52 | |
| Yann Collet | 71eafdd | 2016-02-12 02:31:57 +0100 | [diff] [blame] | 53 | #endif |