blob: 84f7d580283d4c0e1f04f611bcbf34a3d99feb49 [file] [log] [blame]
Yann Collet4ded9e52016-08-30 10:04:33 -07001/**
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 Collet71eafdd2016-02-12 02:31:57 +01009
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 Collete69b8cc2016-06-04 18:56:23 +020020#define ZDICT_STATIC_LINKING_ONLY
21#include "zdict.h" /* ZDICT_params_t */
Yann Collet71eafdd2016-02-12 02:31:57 +010022
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*/
33int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize,
34 const char** fileNamesTable, unsigned nbFiles,
Nick Terrell5b7fd7c2017-06-26 21:07:14 -070035 ZDICT_legacy_params_t *params, ZDICT_cover_params_t *coverParams,
Nick Terrelldf8415c2016-12-31 21:08:24 -080036 int optimizeCover);
Yann Collet71eafdd2016-02-12 02:31:57 +010037
Yann Collet71eafdd2016-02-12 02:31:57 +010038#endif