summaryrefslogtreecommitdiffstats
path: root/src/zstd/contrib/single_file_libs/zstddeclib-in.c
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/contrib/single_file_libs/zstddeclib-in.c
parentInitial commit. (diff)
downloadceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.tar.xz
ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.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 'src/zstd/contrib/single_file_libs/zstddeclib-in.c')
-rw-r--r--src/zstd/contrib/single_file_libs/zstddeclib-in.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/zstd/contrib/single_file_libs/zstddeclib-in.c b/src/zstd/contrib/single_file_libs/zstddeclib-in.c
new file mode 100644
index 000000000..a9083dd34
--- /dev/null
+++ b/src/zstd/contrib/single_file_libs/zstddeclib-in.c
@@ -0,0 +1,54 @@
+/**
+ * \file zstddeclib.c
+ * Single-file Zstandard decompressor.
+ *
+ * Generate using:
+ * \code
+ * combine.sh -r ../../lib -o zstddeclib.c zstddeclib-in.c
+ * \endcode
+ */
+/*
+ * 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.
+ */
+/*
+ * Settings to bake for the standalone decompressor.
+ *
+ * Note: It's important that none of these affects 'zstd.h' (only the
+ * implementation files we're amalgamating).
+ *
+ * Note: MEM_MODULE stops xxhash redefining BYTE, U16, etc., which are also
+ * defined in mem.h (breaking C99 compatibility).
+ *
+ * Note: the undefs for xxHash allow Zstd's implementation to coinside with with
+ * standalone xxHash usage (with global defines).
+ */
+#define DEBUGLEVEL 0
+#define MEM_MODULE
+#undef XXH_NAMESPACE
+#define XXH_NAMESPACE ZSTD_
+#undef XXH_PRIVATE_API
+#define XXH_PRIVATE_API
+#undef XXH_INLINE_ALL
+#define XXH_INLINE_ALL
+#define ZSTD_LEGACY_SUPPORT 0
+#define ZSTD_LIB_COMPRESSION 0
+#define ZSTD_LIB_DEPRECATED 0
+#define ZSTD_NOBENCH
+#define ZSTD_STRIP_ERROR_STRINGS
+
+#include "common/debug.c"
+#include "common/entropy_common.c"
+#include "common/error_private.c"
+#include "common/fse_decompress.c"
+#include "common/zstd_common.c"
+
+#include "decompress/huf_decompress.c"
+#include "decompress/zstd_ddict.c"
+#include "decompress/zstd_decompress.c"
+#include "decompress/zstd_decompress_block.c"