Skip to content

4.7.0

Compare
Choose a tag to compare
@tsolomko tsolomko released this 04 Nov 09:27
· 191 commits to develop since this release
4.7.0
0ff80e3

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 and CompressionAlgorithm 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.
  • Added DataError enum which conforms to Error and Equatable 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 the tar 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 the tar command can now be used together with the -c option to create compressed TAR containers.
    • Added un-lz4, comp-lz4, and comp-lz4-bd subcommands to the benchmark command.
    • Benchmark commands for compression now report compression ratio.