summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-01-03 22:30:03 -0200
committerGuilherme Felipe <guilhermefelipecgs@gmail.com>2019-01-03 22:35:20 -0200
commite64391f47bf95ab4cdb65683623979ee6790836e (patch)
treec85c2c9a80d04e338cf39d0fed3fdba2d0291b29 /core
parentb1e3215f3a316cfaf518747f7dafba4cc0d8d291 (diff)
Update zstd to 1.3.8
Diffstat (limited to 'core')
-rw-r--r--core/SCsub6
-rw-r--r--core/io/compression.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/core/SCsub b/core/SCsub
index fe379d6936..00d0bcac24 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -103,6 +103,7 @@ env_thirdparty.add_source_files(env.core_sources, thirdparty_minizip_sources)
if env['builtin_zstd']:
thirdparty_zstd_dir = "#thirdparty/zstd/"
thirdparty_zstd_sources = [
+ "common/debug.c",
"common/entropy_common.c",
"common/error_private.c",
"common/fse_decompress.c",
@@ -111,15 +112,18 @@ if env['builtin_zstd']:
"common/xxhash.c",
"common/zstd_common.c",
"compress/fse_compress.c",
+ "compress/hist.c",
"compress/huf_compress.c",
"compress/zstd_compress.c",
"compress/zstd_double_fast.c",
"compress/zstd_fast.c",
"compress/zstd_lazy.c",
"compress/zstd_ldm.c",
- "compress/zstdmt_compress.c",
"compress/zstd_opt.c",
+ "compress/zstdmt_compress.c",
"decompress/huf_decompress.c",
+ "decompress/zstd_ddict.c",
+ "decompress/zstd_decompress_block.c",
"decompress/zstd_decompress.c",
]
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
diff --git a/core/io/compression.cpp b/core/io/compression.cpp
index 798c036fae..a113f3b61b 100644
--- a/core/io/compression.cpp
+++ b/core/io/compression.cpp
@@ -81,10 +81,10 @@ int Compression::compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size,
} break;
case MODE_ZSTD: {
ZSTD_CCtx *cctx = ZSTD_createCCtx();
- ZSTD_CCtx_setParameter(cctx, ZSTD_p_compressionLevel, zstd_level);
+ ZSTD_CCtx_setParameter(cctx, ZSTD_c_compressionLevel, zstd_level);
if (zstd_long_distance_matching) {
- ZSTD_CCtx_setParameter(cctx, ZSTD_p_enableLongDistanceMatching, 1);
- ZSTD_CCtx_setParameter(cctx, ZSTD_p_windowLog, zstd_window_log_size);
+ ZSTD_CCtx_setParameter(cctx, ZSTD_c_enableLongDistanceMatching, 1);
+ ZSTD_CCtx_setParameter(cctx, ZSTD_c_windowLog, zstd_window_log_size);
}
int max_dst_size = get_max_compressed_buffer_size(p_src_size, MODE_ZSTD);
int ret = ZSTD_compressCCtx(cctx, p_dst, max_dst_size, p_src, p_src_size, zstd_level);