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

Dim InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"
Dim InputData As MemoryBlock = InputText

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

Dim 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

Dim InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"

Dim Compressed As String = ZStdMBS.Compress(InputText)
Dim 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

Dim InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"
Dim InputData As MemoryBlock = InputText

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

Dim 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

Dim InputText As String = "Hello World. Hello World. Hello World. Hello World. Just a test! Hello World. Testing 😝"

Dim Compressed As String = ZStdMBS.Compress(InputText)
Dim 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...