Skip to content

Releases: tsolomko/SWCompression

4.8.6

21 Apr 10:23
4.8.6
390e0b0
Compare
Choose a tag to compare
  • Swift 5.2 is no longer supported.
  • Added visionOS as a possible deployment target (probably, will only work for Carthage users). (Thanks to @Dukandar for the suggestion!)
  • Added PrivacyInfo file. (Thanks to @michaelversus and @martinK-7 for the suggestion and discussions!)

Comment: SWCompression does not collect and obviously does not send any data anywhere, so the file is essentially empty and was added just to prevent potential problems with Apple bureaucracy for the framework users.

  • Fixed a documentation error in TarEntryInfo.deviceMinorNumber.

Updated 22.04.2024:

  • Non-XCFramework method of installation using Carthage is no longer supported.

4.8.5

19 Feb 16:04
4.8.5
cd39ca0
Compare
Choose a tag to compare
  • Fixed an issue where in some cases LZMA2 decompression would fail and instead would incorrectly throw an error (#40).

4.8.4

20 Dec 19:17
4.8.4
bca9a66
Compare
Choose a tag to compare
  • Fixed an issue where in some cases BZip2 compression would produce incorrect output (#38).
  • The TarReader.read() and TarReader.process(_:) functions now always return nil after reaching the end of a TAR container instead of throwing the DataError.truncated error after returning nil once.
    • This fixes an issue where when a TAR container does not contain an EOF marker these functions would throw the error without returning nil at least once.
    • The documentation for these functions has been updated accordingly.

4.8.3

22 Oct 17:09
4.8.3
6fe73cb
Compare
Choose a tag to compare
  • There are now minimum deployment targets specified in the Swift Package Manager manifest. They match the ones used for CocoaPods spec and in the Xcode project.
  • The properties of GzipHeader are now var-properties instead of let.
  • GZip extra fields are now supported.
    • Added GzipHeader.ExtraField struct.
    • Added GzipHeader.extraFields property.
    • Added a new extraFields argument to GzipArchive.archive function with a default empty array value.

Comment: This is an extremely rarely used format feature and its support has been added mostly for completeness.

  • Fixed potential crashes that could occur when processing GZip archives truncated in a header or a "footer".
  • Some non-well-formed values of PAX extended header records no longer cause TarError.wrongPaxHeaderEntry to be thrown.
    • The record values with newline characters are now fully supported.
    • The record values that do not contain UTF-8 strings are now ignored.

Comment: Such records have been observed to be produced by other implementations, e.g., the one used by default in macOS. It is debatable, however, if these records (especially, non-UTF8 non-string ones) are in conformance with the format specifications.

  • swcomp changes:
    • The symbolic links are now extracted with the values recorded in the containers instead of with a reconstructed absolute path (#37).
    • The hard links are now extracted from TAR containers instead of being ignored.
    • benchmark is now a command group with two commands, run and show.
    • Added -a, --append option to the benchmark run command.
    • Added -d, --description option to the benchmark run command.
    • Added -t, --preserve-timestamp option to the benchmark run command.
    • The file format of saved results is now more flexible and allows multi-way comparisons.
    • Improved precision of time measurements in benchmarks.
    • Fixed build issues on Linux and Windows.

4.8.2

24 Sep 11:41
4.8.2
5419717
Compare
Choose a tag to compare
  • Swift 5.1 is no longer supported.
  • Increased minimum deployment versions for Darwin platforms: macOS from 10.10 to 10.13, iOS from 9.0 to 11.0, tvOS from 9.0 to 11.0, and watchOS from 2.0 to 4.0.

Comment: This is mostly relevant to users who install SWCompression using CocoaPods or Carthage.

  • Fixed issues when building for the iOS platform either directly or via Carthage on systems with Xcode 14.
  • Fixed potential crashes that could occur during Deflate decompression of truncated inputs.
  • swcomp changes:
    • swcomp is now enabled by default in the Swift Package Manager manifest.
    • Added -l, --list option to container commands (7z, tar, and zip).
    • Systematized error exit codes and messages.
    • Added -s, --save option to the benchmark command.
    • Added -c, --compare option to the benchmark command which allows comparison with previously saved results.
    • Added -i, --iteration-count option to the benchmark command.
    • Added -W, --no-warmup option to the benchmark command.
    • Benchmarks now output standard deviation instead of speed uncertainty.

4.8.1

13 May 18:18
4.8.1
0714d44
Compare
Choose a tag to compare
  • Fixed an issue where GZip archives with minimal headers were rejected as truncated (#34).

4.8.0

23 Jan 16:09
4.8.0
4ad6940
Compare
Choose a tag to compare

Big thanks to @philmitchell for finding a solution (#29) to the problem of high memory usage in the new APIs!


  • Added the TarReader and TarWriter structs which allow for more iterative work with TAR containers while helping to reduce the peak memory usage (#28).

Comment: It is highly recommended to review the documentation for the new functionality (TarReader and TarWriter), as there are some limitations on how it can be used.

  • Fixed a crash that could occur when decompressing Deflate and BZip2 inputs truncated in a certain way (#30).

Comment: Unfortunately, this fix has a negative impact on performance, but there are plans to mitigate this issue in the near future.

  • In the API reference documentation website the Container category has been split into separate categories for each container type.
  • swcomp changes:
    • Certain error messages were made a bit clearer.
    • Added reader-tar and writer-tar subcommands to the benchmark command.
    • Changed the printing format of the benchmark speed.
      Comment: Arguably, the new way of speed printing format is worse than the previous one (only one digit of precision, non-adjustable locale-awareness, etc.), as such there are plans to revert to the previous behavior in the near future.

4.8.0 Test

20 Jan 19:22
4.8.0-test
f9f5e9e
Compare
Choose a tag to compare
4.8.0 Test Pre-release
Pre-release

This is a test release for the upcoming 4.8.0 update which includes new TarReader and TarWriter APIs and some other changes.

4.7.0

04 Nov 09:27
4.7.0
0ff80e3
Compare
Choose a tag to compare

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.

4.7.0 Test

30 Oct 10:08
4.7.0-test
5d63df3
Compare
Choose a tag to compare
4.7.0 Test Pre-release
Pre-release

This is the test release for the upcoming 4.7.0 update which includes implementation of LZ4 as well as some other changes.