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 | Default constructor with no parameters. |
EinhugurZstandard | Constructor which takes source and destination files as FolderItem. |
EinhugurZstandard | Constructor which takes IBinaryStreamReader source and destination file as FolderItem. |
EinhugurZstandard | Constructor which takes IBinaryStreamReader source and IBinaryStreamWriter destination. |
EinhugurZstandard | Constructor which takes file as FolderItem source and IBinaryStreamWriter for destination. |
Methods
Compress | 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 | Sets up a compression task for native Thread execution
This function can raise the following exceptions:
When running the task returned by this function then the following exception can be thrown:
|
Decompress | 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 | Sets up a decompression task for native Thread execution
This function can raise the following exceptions:
When running the task returned by this function then the following exception can be thrown:
|
SetDestination | Sets file destination for compression or decompression. |
SetDestination | Sets IBinaryStreamWriter destination for compression or decompression. |
SetProgressHandler | Sets progress handler for the compression or decompression. |
SetSource | Sets file source for compression or decompression. |
SetSource | Sets IBinaryStreamReader source for compression or decompression. |
Delegates
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 bitmacOS Apple SiliconWindows 32 bitWindows 64 bitWindows ARM 64 bitLinux 32 bitLinux 64 bitLinux ARM 32 bitLinux ARM 64 bitiOS