initial commit, 4.5 stable
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
This commit is contained in:
43
doc/classes/StreamPeerGZIP.xml
Normal file
43
doc/classes/StreamPeerGZIP.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<class name="StreamPeerGZIP" inherits="StreamPeer" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
|
||||
<brief_description>
|
||||
A stream peer that handles GZIP and deflate compression/decompression.
|
||||
</brief_description>
|
||||
<description>
|
||||
This class allows to compress or decompress data using GZIP/deflate in a streaming fashion. This is particularly useful when compressing or decompressing files that have to be sent through the network without needing to allocate them all in memory.
|
||||
After starting the stream via [method start_compression] (or [method start_decompression]), calling [method StreamPeer.put_partial_data] on this stream will compress (or decompress) the data, writing it to the internal buffer. Calling [method StreamPeer.get_available_bytes] will return the pending bytes in the internal buffer, and [method StreamPeer.get_partial_data] will retrieve the compressed (or decompressed) bytes from it. When the stream is over, you must call [method finish] to ensure the internal buffer is properly flushed (make sure to call [method StreamPeer.get_available_bytes] on last time to check if more data needs to be read after that).
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
<methods>
|
||||
<method name="clear">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Clears this stream, resetting the internal state.
|
||||
</description>
|
||||
</method>
|
||||
<method name="finish">
|
||||
<return type="int" enum="Error" />
|
||||
<description>
|
||||
Finalizes the stream, compressing any buffered chunk left.
|
||||
You must call it only when you are compressing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="start_compression">
|
||||
<return type="int" enum="Error" />
|
||||
<param index="0" name="use_deflate" type="bool" default="false" />
|
||||
<param index="1" name="buffer_size" type="int" default="65535" />
|
||||
<description>
|
||||
Start the stream in compression mode with the given [param buffer_size], if [param use_deflate] is [code]true[/code] uses deflate instead of GZIP.
|
||||
</description>
|
||||
</method>
|
||||
<method name="start_decompression">
|
||||
<return type="int" enum="Error" />
|
||||
<param index="0" name="use_deflate" type="bool" default="false" />
|
||||
<param index="1" name="buffer_size" type="int" default="65535" />
|
||||
<description>
|
||||
Start the stream in decompression mode with the given [param buffer_size], if [param use_deflate] is [code]true[/code] uses deflate instead of GZIP.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
</class>
|
Reference in New Issue
Block a user