1*01826a49SYabin Cui /* 2*01826a49SYabin Cui * Copyright (c) Meta Platforms, Inc. and affiliates. 3*01826a49SYabin Cui * All rights reserved. 4*01826a49SYabin Cui * 5*01826a49SYabin Cui * This source code is licensed under both the BSD-style license (found in the 6*01826a49SYabin Cui * LICENSE file in the root directory of this source tree) and the GPLv2 (found 7*01826a49SYabin Cui * in the COPYING file in the root directory of this source tree). 8*01826a49SYabin Cui * You may select, at your option, one of the above-listed licenses. 9*01826a49SYabin Cui */ 10*01826a49SYabin Cui 11*01826a49SYabin Cui /* This library is designed for a single-threaded console application. 12*01826a49SYabin Cui * It exit() and printf() into stderr when it encounters an error condition. */ 13*01826a49SYabin Cui 14*01826a49SYabin Cui #ifndef DIBIO_H_003 15*01826a49SYabin Cui #define DIBIO_H_003 16*01826a49SYabin Cui 17*01826a49SYabin Cui 18*01826a49SYabin Cui /*-************************************* 19*01826a49SYabin Cui * Dependencies 20*01826a49SYabin Cui ***************************************/ 21*01826a49SYabin Cui #define ZDICT_STATIC_LINKING_ONLY 22*01826a49SYabin Cui #include "../lib/zdict.h" /* ZDICT_params_t */ 23*01826a49SYabin Cui 24*01826a49SYabin Cui 25*01826a49SYabin Cui /*-************************************* 26*01826a49SYabin Cui * Public functions 27*01826a49SYabin Cui ***************************************/ 28*01826a49SYabin Cui /*! DiB_trainFromFiles() : 29*01826a49SYabin Cui Train a dictionary from a set of files provided by `fileNamesTable`. 30*01826a49SYabin Cui Resulting dictionary is written into file `dictFileName`. 31*01826a49SYabin Cui `parameters` is optional and can be provided with values set to 0, meaning "default". 32*01826a49SYabin Cui @return : 0 == ok. Any other : error. 33*01826a49SYabin Cui */ 34*01826a49SYabin Cui int DiB_trainFromFiles(const char* dictFileName, size_t maxDictSize, 35*01826a49SYabin Cui const char** fileNamesTable, int nbFiles, size_t chunkSize, 36*01826a49SYabin Cui ZDICT_legacy_params_t* params, ZDICT_cover_params_t* coverParams, 37*01826a49SYabin Cui ZDICT_fastCover_params_t* fastCoverParams, int optimize, unsigned memLimit); 38*01826a49SYabin Cui 39*01826a49SYabin Cui #endif 40