GDScript: Enable compression on export
Besides the regular option to export GDScript as binary tokens, this also includes a compression option on top of it. The binary format needs to encode some information which generally makes it bigger than the source text. This option reduces that difference by using Zstandard compression on the buffer.
This commit is contained in:
parent
b4d0a09f15
commit
72e5f8c31e
11 changed files with 93 additions and 44 deletions
|
|
@ -538,7 +538,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
|
|||
} else {
|
||||
String code = FileAccess::get_file_as_string(source_file, &err);
|
||||
if (!err) {
|
||||
Vector<uint8_t> buffer = GDScriptTokenizerBuffer::parse_code_string(code);
|
||||
Vector<uint8_t> buffer = GDScriptTokenizerBuffer::parse_code_string(code, GDScriptTokenizerBuffer::COMPRESS_ZSTD);
|
||||
script->set_binary_tokens_source(buffer);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue