Platforms to show: All Mac Windows Linux Cross-Platform

Back to ZStdMBS class.

ZStdMBS.Compress(Data as MemoryBlock, CompressionLevel as Integer = 1) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Compression MBS Compression Plugin 22.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Compresses the given MemoryBlock.
Example
Var InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"
Var InputData As MemoryBlock = InputText

Var Compressed As MemoryBlock = ZStdMBS.Compress(InputData)
Var OutputData As MemoryBlock = ZStdMBS.Decompress(Compressed)

Var OutputText As String = DefineEncoding(OutputData, encodings.UTF8)

Break

CompressionLevel range from 1 to 22 where 22 is best with most memory usage.

Raises exception (UnsupportedOperationException or OutOfMemoryException) in case it fails. Please read message property for details.

See also:

ZStdMBS.Compress(Data as String, CompressionLevel as Integer = 1) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Compression MBS Compression Plugin 22.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Compresses the given string.
Example
Var InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"

Var Compressed As String = ZStdMBS.Compress(InputText)
Var OutputData As String = ZStdMBS.Decompress(Compressed).DefineEncoding(encodings.UTF8)

Break

CompressionLevel range from 1 to 22 where 22 is best with most memory usage.

Raises exception (UnsupportedOperationException or OutOfMemoryException) in case it fails. Please read message property for details.

See also:

ZStdMBS.Decompress(Data as MemoryBlock) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Compression MBS Compression Plugin 22.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Decompresses MemoryBlock.
Example
Var InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"
Var InputData As MemoryBlock = InputText

Var Compressed As MemoryBlock = ZStdMBS.Compress(InputData)
Var OutputData As MemoryBlock = ZStdMBS.Decompress(Compressed)

Var OutputText As String = DefineEncoding(OutputData, encodings.UTF8)

Break

Raises exception (UnsupportedOperationException or OutOfMemoryException) in case it fails. Please read message property for details.

See also:

ZStdMBS.Decompress(Data as String) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Compression MBS Compression Plugin 22.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Decompresses string.
Example
Var InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"

Var Compressed As String = ZStdMBS.Compress(InputText)
Var OutputData As String = ZStdMBS.Decompress(Compressed).DefineEncoding(encodings.UTF8)

Break

Raises exception (UnsupportedOperationException or OutOfMemoryException) in case it fails. Please read message property for details.

See also:

The items on this page are in the following plugins: MBS Compression Plugin.


The biggest plugin in space...