2017-08-18 16:52:05 -07:00
|
|
|
/*
|
2022-12-20 12:49:47 -05:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2016-08-30 10:04:33 -07:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
2017-08-18 16:52:05 -07:00
|
|
|
* This source code is licensed under both the BSD-style license (found in the
|
|
|
|
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
|
|
* in the COPYING file in the root directory of this source tree).
|
2017-09-08 00:09:23 -07:00
|
|
|
* You may select, at your option, one of the above-listed licenses.
|
2016-08-30 10:04:33 -07:00
|
|
|
*/
|
2016-02-12 02:31:57 +01:00
|
|
|
|
|
|
|
/* This library is designed for a single-threaded console application.
|
|
|
|
* It exit() and printf() into stderr when it encounters an error condition. */
|
|
|
|
|
|
|
|
#ifndef DIBIO_H_003
|
|
|
|
#define DIBIO_H_003
|
|
|
|
|
|
|
|
|
|
|
|
/*-*************************************
|
|
|
|
* Dependencies
|
|
|
|
***************************************/
|
2016-06-04 18:56:23 +02:00
|
|
|
#define ZDICT_STATIC_LINKING_ONLY
|
2021-04-30 15:02:12 -07:00
|
|
|
#include "../lib/zdict.h" /* ZDICT_params_t */
|
2016-02-12 02:31:57 +01:00
|
|
|
|
|
|
|
|
|
|
|
/*-*************************************
|
|
|
|
* Public functions
|
|
|
|
***************************************/
|
|
|
|
/*! DiB_trainFromFiles() :
|
|
|
|
Train a dictionary from a set of files provided by `fileNamesTable`.
|
|
|
|
Resulting dictionary is written into file `dictFileName`.
|
|
|
|
`parameters` is optional and can be provided with values set to 0, meaning "default".
|
|
|
|
@return : 0 == ok. Any other : error.
|
|
|
|
*/
|
2021-10-04 17:47:52 -07:00
|
|
|
int DiB_trainFromFiles(const char* dictFileName, size_t maxDictSize,
|
|
|
|
const char** fileNamesTable, int nbFiles, size_t chunkSize,
|
2018-08-15 14:35:38 -07:00
|
|
|
ZDICT_legacy_params_t* params, ZDICT_cover_params_t* coverParams,
|
2021-12-10 16:19:40 -05:00
|
|
|
ZDICT_fastCover_params_t* fastCoverParams, int optimize, unsigned memLimit);
|
2016-02-12 02:31:57 +01:00
|
|
|
|
|
|
|
#endif
|