mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +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:
		
							parent
							
								
									b4d0a09f15
								
							
						
					
					
						commit
						72e5f8c31e
					
				
					 11 changed files with 93 additions and 44 deletions
				
			
		|  | @ -365,6 +365,7 @@ Error GDScriptParser::parse(const String &p_source_code, const String &p_script_ | |||
| 	pop_multiline(); | ||||
| 
 | ||||
| 	memdelete(text_tokenizer); | ||||
| 	tokenizer = nullptr; | ||||
| 
 | ||||
| #ifdef DEBUG_ENABLED | ||||
| 	if (multiline_stack.size() > 0) { | ||||
|  | @ -384,6 +385,7 @@ Error GDScriptParser::parse_binary(const Vector<uint8_t> &p_binary, const String | |||
| 	Error err = buffer_tokenizer->set_code_buffer(p_binary); | ||||
| 
 | ||||
| 	if (err) { | ||||
| 		memdelete(buffer_tokenizer); | ||||
| 		return err; | ||||
| 	} | ||||
| 
 | ||||
|  | @ -404,6 +406,7 @@ Error GDScriptParser::parse_binary(const Vector<uint8_t> &p_binary, const String | |||
| 	pop_multiline(); | ||||
| 
 | ||||
| 	memdelete(buffer_tokenizer); | ||||
| 	tokenizer = nullptr; | ||||
| 
 | ||||
| 	if (errors.is_empty()) { | ||||
| 		return OK; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 George Marques
						George Marques