opnsense-src/sys/contrib/zstd/programs/dibio.h

40 lines
1.5 KiB
C
Raw Normal View History

2017-08-22 07:02:59 -04:00
/*
2020-05-23 16:37:33 -04:00
* Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
2017-04-15 15:47:16 -04:00
* All rights reserved.
*
2017-08-22 07:02:59 -04: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-11-09 10:38:02 -05:00
* You may select, at your option, one of the above-listed licenses.
2017-04-15 15:47:16 -04: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
***************************************/
#define ZDICT_STATIC_LINKING_ONLY
2020-05-23 16:37:33 -04:00
#include "../lib/dictBuilder/zdict.h" /* ZDICT_params_t */
2017-04-15 15:47:16 -04: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.
*/
int DiB_trainFromFiles(const char* dictFileName, unsigned maxDictSize,
2017-11-09 10:38:02 -05:00
const char** fileNamesTable, unsigned nbFiles, size_t chunkSize,
2018-10-22 16:00:30 -04:00
ZDICT_legacy_params_t* params, ZDICT_cover_params_t* coverParams,
ZDICT_fastCover_params_t* fastCoverParams, int optimize);
2017-04-15 15:47:16 -04:00
#endif