| e-CryptIt Engine - Compression Xojo Plugin |
|
LZMA2 Class (console safe)
LZMA2 is built on LZMA. The LZMA2 encoder processes the input in chunks (of up to 2 MB uncompressed size or 64 KB compressed size, whichever is lower), handing each chunk to the LZMA encoder, and then deciding whether to output an LZMA2 LZMA chunk including the encoded data, or to output an LZMA2 uncompressed chunk, depending on which is shorter (LZMA, like any other compressor, will necessarily expand rather than compress some kinds of data).
The LZMA state is reset only in the first block, if the caller requests a change of properties and every time a compressed chunk is output. The LZMA properties are changed only in the first block, or if the caller requests a change of properties. The dictionary is only reset in the first block.
The LZMA implementation extracted from 7-Zip is available as LZMA SDK. It was originally dual-licensed under both the GNU LGPL and Common Public License,[13] with an additional special exception for linked binaries, but was placed by Igor Pavlov in the public domain on December 2, 2008, with the release of version 4.62.
Properties
AllowYield (console safe) | If set to true then the plugin will yield to Xojo threads during compression or decompression. (Default set to false) |
Level (console safe) | Compression level from 0 to 9 (Default is 5) |
OutputString (console safe) | Returns the result of compression or decompression when the output was set to string. |
WriteEndMark (console safe) | If set to true then end marker is written in the stream. (Default false) |
Methods
Compress (console safe) | Compresses the data that has been set by the input source, to the output destination. |
Decompress (console safe) | Decompresses the data that has been set by the input source, to the output destination. |
shared PluginVersion | Returns the version number of the plugin. |
SetInputToStream (console safe) | Sets the input to a BinaryStream. |
SetInputToString (console safe) | Sets the input to a given string. |
SetOutputToStream (console safe) | Sets the output to BinaryStream |
SetOutputToString (console safe) | Sets the output to write to a string. The result will be written to the OutputString property. |
SetProgressHandler (console safe) | Sets progress hander for the class. (Optional) |
Supported Platforms:
macOS Intel 64 bitmacOS Apple SiliconWindows 32 bitWindows 64 bitWindows ARM 64 bitLinux 32 bitLinux 64 bitLinux ARM 32 bitLinux ARM 64 bitiOS