]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/zstd/programs/dibio.h
Import zstandard 1.1.4 in base
[FreeBSD/FreeBSD.git] / contrib / zstd / programs / dibio.h
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  */
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 ***************************************/
20 #define ZDICT_STATIC_LINKING_ONLY
21 #include "zdict.h"     /* ZDICT_params_t */
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,
35                        ZDICT_params_t *params, COVER_params_t *coverParams,
36                        int optimizeCover);
37
38 #endif