aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/zstd/zstd_compress_literals.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-03-02 09:19:48 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-03-02 09:19:48 +0000
commit77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45 (patch)
tree9a5de720c81ad9403451b04adcb62ba010a1fad7 /contrib/zstd/zstd_compress_literals.h
parent5e792b26110c4b84c93b2cc724d656f6d96b5135 (diff)
downloadrspamd-77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45.tar.gz
rspamd-77dc28d43e0f0a3a2ec7c61b3d6c9be8a4d0fa45.zip
[Minor] Update zstd to 1.5.4
Diffstat (limited to 'contrib/zstd/zstd_compress_literals.h')
-rw-r--r--contrib/zstd/zstd_compress_literals.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/contrib/zstd/zstd_compress_literals.h b/contrib/zstd/zstd_compress_literals.h
index 8b0870574..b060c8ad2 100644
--- a/contrib/zstd/zstd_compress_literals.h
+++ b/contrib/zstd/zstd_compress_literals.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016-2020, Yann Collet, Facebook, Inc.
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
@@ -16,14 +16,24 @@
size_t ZSTD_noCompressLiterals (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
+/* ZSTD_compressRleLiteralsBlock() :
+ * Conditions :
+ * - All bytes in @src are identical
+ * - dstCapacity >= 4 */
size_t ZSTD_compressRleLiteralsBlock (void* dst, size_t dstCapacity, const void* src, size_t srcSize);
-size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
- ZSTD_hufCTables_t* nextHuf,
- ZSTD_strategy strategy, int disableLiteralCompression,
- void* dst, size_t dstCapacity,
+/* ZSTD_compressLiterals():
+ * @entropyWorkspace: must be aligned on 4-bytes boundaries
+ * @entropyWorkspaceSize : must be >= HUF_WORKSPACE_SIZE
+ * @suspectUncompressible: sampling checks, to potentially skip huffman coding
+ */
+size_t ZSTD_compressLiterals (void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
void* entropyWorkspace, size_t entropyWorkspaceSize,
- const int bmi2);
+ const ZSTD_hufCTables_t* prevHuf,
+ ZSTD_hufCTables_t* nextHuf,
+ ZSTD_strategy strategy, int disableLiteralCompression,
+ int suspectUncompressible,
+ int bmi2);
#endif /* ZSTD_COMPRESS_LITERALS_H */