4.7.0
In this update LZ4 compression and decompression has been implemented. By providing 5 new functions, from a simple LZ4.decompress(data:)
function to a more advanced LZ4.compress
with 5 required and 3 optional arguments, SWCompression supports all features and options of the LZ4 format and algorithm (including external dictionary (de)compression).
You may also note that the new functions throw errors from a new DataError
type instead of the algorithm-specific LZ4Error. The current plan is to use this new enum for all newly added functionality going forward and replace all previous algorithm/format-specific error types in the next major update (like 5.0).
- Added support for LZ4 compression and decompression by introducing 5 new functions inside
LZ4
enum.- This enum conforms to the
DecompressionAlgorithm
andCompressionAlgorithm
protocols. - Added SWCompression/LZ4 subspec for CocoaPods users.
- Added support for the use of the LZ4 algorithm in 7-Zip containers.
- The SWCompression/LZ4 subspec acts as a "optional dependency" for SWCompression/SevenZip subspec.
- This enum conforms to the
- Added
DataError
enum which conforms toError
andEquatable
protocols. - Swift 5.0 is no longer supported.
- Fixed an issue where in some cases Deflate compression would produce incorrect output.
- Optimized performance of the Deflate compression.
- swcomp changes:
- Increased the lowest required version of SwiftCLI dependency to 6.0.0.
- Added
lz4
command with many options to support all LZ4 features (both compression and decompression). - Added
--use-format
option to thetar
command which when used with the-c
option allows to force the use of a selected TAR format when creating a TAR container. - The
-j
and-z
options of thetar
command can now be used together with the-c
option to create compressed TAR containers. - Added
un-lz4
,comp-lz4
, andcomp-lz4-bd
subcommands to thebenchmark
command. - Benchmark commands for compression now report compression ratio.