e-CryptIt Engine - Compression Xojo Plugin |

# EinhugurZstandard Class (console safe)

Zstandard is a fast compression algorithm, providing high compression ratios.
The plugin offers a very wide range of speed / compression trade-off, and is backed by an extremely fast decoder.
The plugin from Einhugur Software is commercial software but the library under the hood is free software with BSD license.
Zstandard library is provided as open source software using a BSD license. Its format is stable and published as IETF RFC 8878.
License for the library under the hood:
BSD License
For Zstandard software
Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name Facebook nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Object
EinhugurZstandard

class EinhugurZstandard

#### Constructors

EinhugurZstandard (console safe) | Default constructor with no parameters.
EinhugurZstandard (console safe) | Constructor which takes source and destination files as FolderItem.
EinhugurZstandard (console safe) | Constructor which takes IBinaryStreamReader source and destination file as FolderItem.
EinhugurZstandard (console safe) | Constructor which takes IBinaryStreamReader source and IBinaryStreamWriter destination.
EinhugurZstandard (console safe) | Constructor which takes file as FolderItem source and IBinaryStreamWriter for destination.

#### Methods

Compress (console safe) | Compresses file or steam according to how it has been set up on the class. This method can raise the following exceptions: InvalidArgumentException IOException
CompressTask (console safe) | Sets up a compression task for native Thread execution This function can raise the following exceptions: InvalidArgumentException When running the task returned by this function then the following exception can be thrown: IOException
Decompress (console safe) | Decompresses file or steam according to how it has been set up on the class. This method can raise the following exceptions: InvalidArgumentException IOException
DecompressTask (console safe) | Sets up a decompression task for native Thread execution This function can raise the following exceptions: InvalidArgumentException When running the task returned by this function then the following exception can be thrown: IOException
SetDestination (console safe) | Sets file destination for compression or decompression.
SetDestination (console safe) | Sets IBinaryStreamWriter destination for compression or decompression.
SetProgressHandler (console safe) | Sets progress handler for the compression or decompression.
SetSource (console safe) | Sets file source for compression or decompression.
SetSource (console safe) | Sets IBinaryStreamReader source for compression or decompression.

#### Delegates

ProgressDelegate (console safe) | Delegate for progress handling.

#### Constants

CompressionLevelDefault = 3 | Default compression level for Zstandard compression. Value of this constant is 3.
CompressionLevelMaxSafe = 20 | Maximum safe compression level for the Zstandard compression. Value of this constant is 20.
CompressionLevelMax = 22 | Maximum compression level for the ZStandard compression. Levels above 20 should be used carefully as you can get memory and resource issues. Value of this constant is 22.
FileExtension = ".zst" | File extension for the ZStandard file format. This constant will return zst
InternetMediaType = "application/zstd" | Internet media type constant for the file format. This constant will return application/zstd

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon
- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit
- iOS