Compress/decompress and Encode/Decode DataBase64.

This commit is contained in:
jussi
2023-11-03 23:12:55 +02:00
parent e61823b8bb
commit d74a505d40
16 changed files with 676 additions and 172 deletions

122
API.md
View File

@@ -3391,28 +3391,52 @@ The key was held down until it repeated
## Globals - CBuffer
> BUFFER_UNSIGNED_CHAR = 0
C type char
C type unsigned char
---
> BUFFER_UNSIGNED_SHORT = 1
C type short
C type unsigned short
---
> BUFFER_UNSIGNED_INT = 2
C type unsigned int
---
> BUFFER_CHAR = 3
C type char
---
> BUFFER_SHORT = 4
C type short
---
> BUFFER_INT = 5
C type int
---
> BUFFER_FLOAT = 3
> BUFFER_FLOAT = 6
C type float
---
> BUFFER_DOUBLE = 7
C type double
---
## Globals - Window
> EVENT_WINDOW_SIZE = 0
@@ -3804,20 +3828,6 @@ Open URL with default system browser (If available)
---
> buffer = RL.LoadBuffer( data{} buffer, int type )
Load Buffer. Type should be one of the Buffer types
- Success return Buffer
---
> RL.UnloadBuffer( Buffer buffer )
Unload buffer data
---
> enabled = RL.IsGCUnloadEnabled()
Check if Lua garbage collection is set to unload object data
@@ -4494,6 +4504,42 @@ Get file modification time (Last write time)
---
## Core - Compression/Encoding functionality
---
> compData = RL.CompressData( string data )
Compress data (DEFLATE algorithm)
- Success return Buffer
---
> data, dataSize = RL.DecompressData( Buffer compData )
Decompress data (DEFLATE algorithm).
- Success return string, int
---
> encodedData, outputSize = RL.EncodeDataBase64( string data )
Encode data to Base64 string
- Success return string, int
---
> decodedData, outputSize = RL.DecodeDataBase64( string data )
Decode Base64 string data
- Success return string, int
---
## Core - Camera2D
---
@@ -4832,6 +4878,48 @@ Get the world space position for a 2d camera screen space position
---
## Core - Buffer
---
> buffer = RL.LoadBuffer( data{} buffer, int type )
Load Buffer. Type should be one of the Buffer types
- Success return Buffer
---
> RL.UnloadBuffer( Buffer buffer )
Unload buffer data
---
> data = RL.GetBufferData( Buffer buffer )
Get buffer data as table in the format is was stored
- Success return data{}
---
> type = RL.GetBufferType( Buffer buffer )
Get buffer type
- Success return int
---
> size = RL.GetBufferSize( Buffer buffer )
Get buffer size
- Success return int
---
## Shapes - Drawing
---