summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-18 15:01:32 +0200
committerGitHub <noreply@github.com>2019-04-18 15:01:32 +0200
commit4f22fde635928735366ab656cd52ba3c6a791161 (patch)
tree6451f953f76525a3c4182c0a3d20867d20051e5d /core
parent2dee231c8e229c93ba0979d8bee9559b571b9462 (diff)
parent20265879e2d34b1d6e38942173ff08c270284796 (diff)
Merge pull request #28158 from akien-mga/zstd-1.4.0
zstd: Update to upstream 1.4.0, remove call to experimental API
Diffstat (limited to 'core')
-rw-r--r--core/io/compression.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/io/compression.cpp b/core/io/compression.cpp
index a113f3b61b..b51e50150e 100644
--- a/core/io/compression.cpp
+++ b/core/io/compression.cpp
@@ -175,7 +175,9 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
} break;
case MODE_ZSTD: {
ZSTD_DCtx *dctx = ZSTD_createDCtx();
- if (zstd_long_distance_matching) ZSTD_DCtx_setMaxWindowSize(dctx, (size_t)1 << zstd_window_log_size);
+ if (zstd_long_distance_matching) {
+ ZSTD_DCtx_setParameter(dctx, ZSTD_d_windowLogMax, zstd_window_log_size);
+ }
int ret = ZSTD_decompressDCtx(dctx, p_dst, p_dst_max_size, p_src, p_src_size);
ZSTD_freeDCtx(dctx);
return ret;
@@ -189,4 +191,4 @@ int Compression::zlib_level = Z_DEFAULT_COMPRESSION;
int Compression::gzip_level = Z_DEFAULT_COMPRESSION;
int Compression::zstd_level = 3;
bool Compression::zstd_long_distance_matching = false;
-int Compression::zstd_window_log_size = 27;
+int Compression::zstd_window_log_size = 27; // ZSTD_WINDOWLOG_LIMIT_DEFAULT