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

EinhugurZstandardDefault constructor with no parameters.
EinhugurZstandardConstructor which takes source and destination files as FolderItem.
EinhugurZstandardConstructor which takes IBinaryStreamReader source and destination file as FolderItem.
EinhugurZstandardConstructor which takes IBinaryStreamReader source and IBinaryStreamWriter destination.
EinhugurZstandardConstructor which takes file as FolderItem source and IBinaryStreamWriter for destination.

Methods

CompressCompresses file or steam according to how it has been set up on the class.
This method can raise the following exceptions:
  • InvalidArgumentException
  • IOException
CompressTaskSets 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

DecompressDecompresses file or steam according to how it has been set up on the class.
This method can raise the following exceptions:
  • InvalidArgumentException
  • IOException
DecompressTaskSets 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

SetDestinationSets file destination for compression or decompression.
SetDestinationSets IBinaryStreamWriter destination for compression or decompression.
SetProgressHandlerSets progress handler for the compression or decompression.
SetSourceSets file source for compression or decompression.
SetSourceSets IBinaryStreamReader source for compression or decompression.

Delegates

ProgressDelegate (console safe) Delegate for progress handling.

Constants

CompressionLevelDefault = 3Default compression level for Zstandard compression. Value of this constant is 3.
CompressionLevelMaxSafe = 20Maximum safe compression level for the Zstandard compression. Value of this constant is 20.
CompressionLevelMax = 22Maximum 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