Platforms to show: All Mac Windows Linux Cross-Platform

WindowsCompressorMBS class   New in 25.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows MBS Win Plugin 25.2 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
The Windows compression class.
Example
// build some data to compress
Var m As String = "Hello World "
m = m + m + m + m
m = m + m + m + m
m = m + m + m + m
m = m + m + m + m

Var algorithm As Integer = WindowsCompressorMBS.AlgorithmLZMS

// compress with one class
Var c As New WindowsCompressorMBS(algorithm)
Var m2 As String = c.Compress(m)

// and decompress with other class
Var d As New WindowsDecompressorMBS(algorithm)
Var m3 As String = d.Decompress(m2)

Break

Using the built-in compression libraries in Windows 8 or newer.

All methods and properties can raise an UnsupportedOperationException reporting back a Windows error.

  • 3 properties
  • 6 methods
    • method Compress(UncompressedData as MemoryBlock) as MemoryBlock
    • method Compress(UncompressedData as Ptr, UncompressedDataSize as Integer, CompressedBuffer as Ptr, CompressedBufferSize as Integer) as Integer
    • method Compress(UncompressedData as String) as String
    • method Constructor(Algorithm as Integer)
    • method Destructor
    • method Reset
  • 2 shared methods
    • shared method CompressData(Algorithm as Integer, UncompressedData as MemoryBlock) as MemoryBlock
    • shared method CompressData(Algorithm as Integer, UncompressedData as String) as String
  • 8 constants

Algorithms

Constant Value Description
AlgorithmInvalid 0 Invalid value
AlgorithmLZMS 5 LZMS compression algorithm
AlgorithmMax 6 Maximum value
AlgorithmMSZip 2 MSZIP compression algorithm
AlgorithmNull 1 No compression
AlgorithmXPress 3 XPRESS compression algorithm
AlgorithmXPressHuff 4 XPRESS compression algorithm with Huffman encoding
CompressRaw 536870912 Use a "bitwise OR" operator to include CompressRaw and to create a block mode compressor. If CompressRaw is not included, the Compression API creates a buffer mode compressor.

This class has no sub classes.

Blog Entries

Release notes

Some related classes:


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


WindowsClipboardMBS   -   WindowsConsoleMBS


The biggest plugin in space...