From f177c1534757973063f244450df063def879d7db Mon Sep 17 00:00:00 2001 From: Ferenc Arn Date: Thu, 8 Jun 2017 20:43:56 -0500 Subject: Add zstd compression support. zstd has much better compression speed and ratio, and better decompression speed than currently available methods. Also set zstd as the default compression method for Compression as well as FileAccessCompressed functions. --- core/SCsub | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'core/SCsub') diff --git a/core/SCsub b/core/SCsub index fd3f57dd7c..da2403f1d3 100644 --- a/core/SCsub +++ b/core/SCsub @@ -83,6 +83,25 @@ thirdparty_minizip_sources = [ thirdparty_minizip_sources = [thirdparty_minizip_dir + file for file in thirdparty_minizip_sources] env.add_source_files(env.core_sources, thirdparty_minizip_sources) +thirdparty_zstd_dir = "#thirdparty/zstd/" +thirdparty_zstd_sources = [ + "common/entropy_common.c", + "common/error_private.c", + "common/fse_decompress.c", + "common/pool.c", + "common/threading.c", + "common/xxhash.c", + "common/zstd_common.c", + "compress/fse_compress.c", + "compress/huf_compress.c", + "compress/zstd_compress.c", + "compress/zstdmt_compress.c", + "decompress/huf_decompress.c", + "decompress/zstd_decompress.c", +] +thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources] +env.add_source_files(env.core_sources, thirdparty_zstd_sources) + # Godot's own sources env.add_source_files(env.core_sources, "*.cpp") @@ -104,5 +123,5 @@ SConscript('helper/SCsub') # Build it all as a library lib = env.Library("core", env.core_sources) env.Prepend(LIBS=[lib]) - +env.Append(CPPPATH=["#thirdparty/zstd", "#thirdparty/zstd/common"]) Export('env') -- cgit v1.2.3