summaryrefslogtreecommitdiff
path: root/doc/base
diff options
context:
space:
mode:
authorThomas Herzog <karroffel@users.noreply.github.com>2017-06-19 22:59:24 +0200
committerGitHub <noreply@github.com>2017-06-19 22:59:24 +0200
commit9d67be447a80a742a9d5c5f12363da6d77f7284d (patch)
tree6a50b1bb75b239159fdc4ae1d32652b07b85a06b /doc/base
parent6b93455b6b8c3c684a8e4b4b09dc54ca30f15c94 (diff)
parent34b6922caafe0138668859864adda19c4b803946 (diff)
Merge pull request #9274 from vnen/compress-functions
Expose compression functions to GDScript
Diffstat (limited to 'doc/base')
-rw-r--r--doc/base/classes.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index fd3d629505..2139d1a467 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -15299,6 +15299,19 @@
Open the file for writing or reading, depending on the flags.
</description>
</method>
+ <method name="open_compressed">
+ <return type="int">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <argument index="1" name="mode_flags" type="int">
+ </argument>
+ <argument index="2" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Open a compressed file for reading or writing. The compression_mode can be set as one of the COMPRESSION_* constants.
+ </description>
+ </method>
<method name="open_encrypted">
<return type="int">
</return>
@@ -15445,6 +15458,15 @@
<constant name="WRITE_READ" value="7">
Open the file for reading and writing. Create it if the file not exists and truncate if it exists.
</constant>
+ <constant name="COMPRESSION_FASTLZ" value="0">
+ Use the FastLZ compression method.
+ </constant>
+ <constant name="COMPRESSION_DEFLATE" value="1">
+ Use the Deflate compression method.
+ </constant>
+ <constant name="COMPRESSION_ZSTD" value="2">
+ Use the Zstd compression method.
+ </constant>
</constants>
</class>
<class name="FileDialog" inherits="ConfirmationDialog" category="Core">
@@ -33764,6 +33786,26 @@
Append an [PoolByteArray] at the end of this array.
</description>
</method>
+ <method name="compress">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Returns a new [PoolByteArray] with the data compressed. The compression mode can be set using one of the COMPRESS_* constants of [File].
+ </description>
+ </method>
+ <method name="decompress">
+ <return type="PoolByteArray">
+ </return>
+ <argument index="0" name="buffer_size" type="int">
+ </argument>
+ <argument index="1" name="compression_mode" type="int" default="0">
+ </argument>
+ <description>
+ Returns a new [PoolByteArray] with the data decompressed. The buffer_size should be set as the size of the uncompressed data. The compression mode can be set using one of the COMPRESS_* constants of [File].
+ </description>
+ </method>
<method name="get_string_from_ascii">
<return type="String">
</return>