summaryrefslogtreecommitdiff
path: root/thirdparty/zstd/compress/zstd_compress_literals.c
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-28 19:13:17 +0200
committerGitHub <noreply@github.com>2022-06-28 19:13:17 +0200
commit8cd6127cb8905485f6e27f6e3760df78fb227aa4 (patch)
tree9016424e7553ca4ff930714dd5602db9b6bf15a0 /thirdparty/zstd/compress/zstd_compress_literals.c
parent622b656c40f9d8d9c8fdd45d6727f416952636d7 (diff)
parent39ed39900e34e10f40d0d06ed358d2641d7f3315 (diff)
Merge pull request #59167 from akien-mga/zstd-1.5.2
zstd: Update to upstream version 1.5.2
Diffstat (limited to 'thirdparty/zstd/compress/zstd_compress_literals.c')
-rw-r--r--thirdparty/zstd/compress/zstd_compress_literals.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/thirdparty/zstd/compress/zstd_compress_literals.c b/thirdparty/zstd/compress/zstd_compress_literals.c
index 008337bb1b..52b0a8059a 100644
--- a/thirdparty/zstd/compress/zstd_compress_literals.c
+++ b/thirdparty/zstd/compress/zstd_compress_literals.c
@@ -73,7 +73,8 @@ size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
void* dst, size_t dstCapacity,
const void* src, size_t srcSize,
void* entropyWorkspace, size_t entropyWorkspaceSize,
- const int bmi2)
+ const int bmi2,
+ unsigned suspectUncompressible)
{
size_t const minGain = ZSTD_minGain(srcSize, strategy);
size_t const lhSize = 3 + (srcSize >= 1 KB) + (srcSize >= 16 KB);
@@ -105,11 +106,11 @@ size_t ZSTD_compressLiterals (ZSTD_hufCTables_t const* prevHuf,
HUF_compress1X_repeat(
ostart+lhSize, dstCapacity-lhSize, src, srcSize,
HUF_SYMBOLVALUE_MAX, HUF_TABLELOG_DEFAULT, entropyWorkspace, entropyWorkspaceSize,
- (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2) :
+ (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2, suspectUncompressible) :
HUF_compress4X_repeat(
ostart+lhSize, dstCapacity-lhSize, src, srcSize,
HUF_SYMBOLVALUE_MAX, HUF_TABLELOG_DEFAULT, entropyWorkspace, entropyWorkspaceSize,
- (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2);
+ (HUF_CElt*)nextHuf->CTable, &repeat, preferRepeat, bmi2, suspectUncompressible);
if (repeat != HUF_repeat_none) {
/* reused the existing table */
DEBUGLOG(5, "Reusing previous huffman table");