Releases: tsolomko/SWCompression
Release list
4.9.1
- Fixed an issue where
GzipError.cannotEncodeISOLatin1is incorrectly thrown on non-Darwin platforms with Swift 6.0 (#66). - Fixed an issue where
ZipError.wrongTextFieldis 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
- 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.
- Added
BZip2.multiDecompress(data:)function (#59).
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.
- Fixed incorrect parsing of LZMA dictionary sizes larger than 224-1 in 7-Zip containers (PR #61 by @analytical-engines and @nekonya).
swcomp changes:
- SPM target is now enabled only on macOS.
- Added
-m,--multi-decompressoption tobz2command. - 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-uuidoption tobenchmark showcommand. - Added
--metadata-onlyoption tobenchmark showcommand. - Added
--self-compareoption tobenchmark showcommand. - Added
benchmark remove-runcommand. - Updated benchmark results file format.
- Added
benchmark convertcommand.
4.8.7
- Pinned the version of BitByteData dependency to 2.0.4 (thanks to @wkonury-an for the suggestion, PR #64).
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
- 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
4.8.4
- Fixed an issue where in some cases BZip2 compression would produce incorrect output (#38).
- The
TarReader.read()andTarReader.process(_:)functions now always returnnilafter reaching the end of a TAR container instead of throwing theDataError.truncatederror after returningnilonce.- This fixes an issue where when a TAR container does not contain an EOF marker these functions would throw the error without returning
nilat least once. - The documentation for these functions has been updated accordingly.
- This fixes an issue where when a TAR container does not contain an EOF marker these functions would throw the error without returning
4.8.3
- 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
GzipHeaderare nowvar-properties instead oflet. - GZip extra fields are now supported.
- Added
GzipHeader.ExtraFieldstruct. - Added
GzipHeader.extraFieldsproperty. - Added a new
extraFieldsargument toGzipArchive.archivefunction with a default empty array value.
- Added
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.wrongPaxHeaderEntryto 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.
benchmarkis now a command group with two commands,runandshow.- Added
-a,--appendoption to thebenchmark runcommand. - Added
-d,--descriptionoption to thebenchmark runcommand. - Added
-t,--preserve-timestampoption to thebenchmark runcommand. - 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
- 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,--listoption to container commands (7z,tar, andzip). - Systematized error exit codes and messages.
- Added
-s,--saveoption to thebenchmarkcommand. - Added
-c,--compareoption to thebenchmarkcommand which allows comparison with previously saved results. - Added
-i,--iteration-countoption to thebenchmarkcommand. - Added
-W,--no-warmupoption to thebenchmarkcommand. - Benchmarks now output standard deviation instead of speed uncertainty.
4.8.1
4.8.0
Big thanks to @philmitchell for finding a solution (#29) to the problem of high memory usage in the new APIs!
- Added the
TarReaderandTarWriterstructs 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-tarandwriter-tarsubcommands to thebenchmarkcommand. - 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.