summaryrefslogtreecommitdiffstats
path: root/src/zstd/programs/dibio.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/zstd/programs/dibio.h
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/zstd/programs/dibio.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/zstd/programs/dibio.h b/src/zstd/programs/dibio.h
new file mode 100644
index 000000000..682723d6a
--- /dev/null
+++ b/src/zstd/programs/dibio.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * 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).
+ * You may select, at your option, one of the above-listed licenses.
+ */
+
+/* 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
+#include "../lib/dictBuilder/zdict.h" /* ZDICT_params_t */
+
+
+/*-*************************************
+* 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,
+ const char** fileNamesTable, unsigned nbFiles, size_t chunkSize,
+ ZDICT_legacy_params_t* params, ZDICT_cover_params_t* coverParams,
+ ZDICT_fastCover_params_t* fastCoverParams, int optimize);
+
+#endif