Releases: tsolomko/SWCompression
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 returnnil
after reaching the end of a TAR container instead of throwing theDataError.truncated
error after returningnil
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.
- 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
GzipHeader
are nowvar
-properties instead oflet
. - GZip extra fields are now supported.
- Added
GzipHeader.ExtraField
struct. - Added
GzipHeader.extraFields
property. - Added a new
extraFields
argument toGzipArchive.archive
function 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.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
andshow
.- Added
-a
,--append
option to thebenchmark run
command. - Added
-d
,--description
option to thebenchmark run
command. - Added
-t
,--preserve-timestamp
option to thebenchmark 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
- 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
, andzip
). - Systematized error exit codes and messages.
- Added
-s
,--save
option to thebenchmark
command. - Added
-c
,--compare
option to thebenchmark
command which allows comparison with previously saved results. - Added
-i
,--iteration-count
option to thebenchmark
command. - Added
-W
,--no-warmup
option to thebenchmark
command. - 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
TarReader
andTarWriter
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
andwriter-tar
subcommands to thebenchmark
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
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
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.
4.7.0 Test
This is the test release for the upcoming 4.7.0 update which includes implementation of LZ4 as well as some other changes.