You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
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:
@@ -34,6 +34,12 @@
|
||||
#include "gdscript_tokenizer.h"
|
||||
|
||||
class GDScriptTokenizerBuffer : public GDScriptTokenizer {
|
||||
public:
|
||||
enum CompressMode {
|
||||
COMPRESS_NONE,
|
||||
COMPRESS_ZSTD,
|
||||
};
|
||||
|
||||
enum {
|
||||
TOKEN_BYTE_MASK = 0x80,
|
||||
TOKEN_BITS = 8,
|
||||
@@ -64,7 +70,7 @@ class GDScriptTokenizerBuffer : public GDScriptTokenizer {
|
||||
|
||||
public:
|
||||
Error set_code_buffer(const Vector<uint8_t> &p_buffer);
|
||||
static Vector<uint8_t> parse_code_string(const String &p_code);
|
||||
static Vector<uint8_t> parse_code_string(const String &p_code, CompressMode p_compress_mode);
|
||||
|
||||
virtual int get_cursor_line() const override;
|
||||
virtual int get_cursor_column() const override;
|
||||
|
||||
Reference in New Issue
Block a user