Skip to content

Releases: tsolomko/SWCompression

4.9.1

Choose a tag to compare

@tsolomko tsolomko released this 13 Jun 08:33
4.9.1
03a68e6
  • Fixed an issue where GzipError.cannotEncodeISOLatin1 is incorrectly thrown on non-Darwin platforms with Swift 6.0 (#66).
  • Fixed an issue where ZipError.wrongTextField is incorrectly thrown on non-Darwin platforms with Swift 6.0 and 6.1 (#65).

Comment: These issues were discovered after enabling testing in CI on Linux and Windows platforms. It is possible that the issues might also exist for Swift versions earlier than 6.0. Both of these problems are most likely caused by inconsistent/unreliable implementation of String encoding features on non-Darwin platforms. It is not, unfortunately, possible to guarantee that the String encoding/decoding is now equivalent between Darwin platforms, non-affected Swift versions on non-Darwin platforms, and the implemented fixes.

4.9.0

Choose a tag to compare

@tsolomko tsolomko released this 23 May 06:36
4.9.0
c729f0b
  • Swift versions from 5.3 up to and including 5.8 are no longer supported.
  • Cocoapods and Carthage installation methods are no longer supported.

Comment: It is my understanding that Cocoapods is effectively deprecated with its trunk repository switching to read-only mode later this year. As for Carthage, I am just tired with dealing with their issues and complexity required to support it.

  • Enabled visionOS platform for Swift Package Manager.
  • Increased minimum deployment versions for Darwin platforms: macOS from 10.13 to 14.0, iOS from 11.0 to 17.0, tvOS from 11.0 to 17.0, and watchOS from 4.0 to 10.0.
  • Increased the lowest required version of BitByteData dependency to 2.1.

Comment: This update of BitByteData comes with a number of performance improvements that are beneficial for Deflate and BZip2 (de)compression.

Comment: This function is able to decompress multiple BZip2 archives concatenated together.

  • Improved performance of Deflate, BZip2, and LZMA/LZMA2 implementations.
  • Improved handling of truncated inputs in Deflate, BZip2, and Zlib decompression to prevent potential crashes.
  • Fixed potential crashes when attempting to Deflate decompress a corrupted input (#57).

Comment: Apart from fixing the crash described in #57, a number of additional situations of invalid inputs are now handled by throwing an error instead of crashing.

swcomp changes:
  • SPM target is now enabled only on macOS.
  • Added -m, --multi-decompress option to bz2 command.
  • Benchmark metadatas are now printed in a standard order.
  • Benchmarking warmup iteration results are now printed and saved into a file.
  • Benchmarking raw data is now saved into a file.
  • Improved benchmarking output for multi-way comparsions.
  • Added --print-uuid option to benchmark show command.
  • Added --metadata-only option to benchmark show command.
  • Added --self-compare option to benchmark show command.
  • Added benchmark remove-run command.
  • Updated benchmark results file format.
  • Added benchmark convert command.

4.8.7

Choose a tag to compare

@tsolomko tsolomko released this 23 May 06:20
4.8.7
b0b560e

Comment: A recent 2.1.0 update of BitByteData increased minimum deployment versions of Darwin platforms, among other things. As discussion in #63 revealed, this caused problems for users who are unable at this time to increase the versions of their deployment targets. At its core, this conflict is caused by SWCompression depending on BitByteData up to next major version of the latter. In the future, this might be changed to "up to next minor version" setting. For the time being if required users can pin SWCompression to 4.8.7 to prevent disruptions. However, if possible, it is still highly recommended to update SWCompression to 4.9.0 since it contains various issue fixes and substantial performance improvements in part enabled by BitByteData 2.1.0.

4.8.6

Choose a tag to compare

@tsolomko tsolomko released this 21 Apr 10:23
4.8.6
390e0b0
  • 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

Choose a tag to compare

@tsolomko tsolomko released this 19 Feb 16:04
4.8.5
cd39ca0
  • Fixed an issue where in some cases LZMA2 decompression would fail and instead would incorrectly throw an error (#40).

4.8.4

Choose a tag to compare

@tsolomko tsolomko released this 20 Dec 19:17
4.8.4
bca9a66
  • 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

Choose a tag to compare

@tsolomko tsolomko released this 22 Oct 17:09
4.8.3
6fe73cb
  • 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

Choose a tag to compare

@tsolomko tsolomko released this 24 Sep 11:41
4.8.2
5419717
  • 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

Choose a tag to compare

@tsolomko tsolomko released this 13 May 18:18
4.8.1
0714d44
  • Fixed an issue where GZip archives with minimal headers were rejected as truncated (#34).

4.8.0

Choose a tag to compare

@tsolomko tsolomko released this 23 Jan 16:09
4.8.0
4ad6940

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.