Releases: tsolomko/SWCompression
4.6.1
4.6.0
- Swift 4.2 is no longer supported. For reference, the following platforms and Swift versions are supported at the time of this release:
- Apple platforms: Swift 5.0+
- Linux: Swift 5.0+
- Windows: Swift 5.4+
- Minimum iOS deployment version (when installed via CocoaPods or Carthage) is now 9.0.
- Increased the lowest required version of BitByteData dependency to 2.0.
- Added the
TarContainer.create(from:force:)
function which allows to specify TAR format (#24).
Comment: By using this function it is now possible to create TAR containers of GNU, ustar (POSIX), and pre-POSIX formats (in addition to PAX). However, it is still highly recommended to use TarContainer.create(from:)
instead, unless you have a specific reason to choose a particular format and you understand the limitations of that format.
- The
TarContainer.create(from:)
function (alongside with the newly added function) no longer throws.- As a result
TarCreateError.utf8NonEncodable
is now never thrown and will be removed in the next major update (together with theTarCreateError
enum).
- As a result
- Handling of truncated TAR containers should now be more consistent.
- The check for truncated containers, that was introduced in 4.5.11, now throws the
TarError.tooSmallFileIsPassed
error instead ofTarError.wrongField
.
- The check for truncated containers, that was introduced in 4.5.11, now throws the
- Documentation has been updated:
- Adjusted documentation of the
TarEntryInfo
properties to account for other formats used in creation of a container. - Adjusted documentation of the
TarError.tooSmallFileIsPassed
error to mention its use in all situations when truncated data is encountered.
- Adjusted documentation of the
- swcomp changes:
- The
zip -i
command now prints entry comments only if they are not empty. - Slight grammatical improvements to the help messages.
- The
4.6.0 Test
This is a test release for the upcoming 4.6.0 update, where a new TarContainer.create(from:force:)
function has been added, as well as a major rework of the TAR implementation has been performed.
Known issue: The new function lacks documentation.
4.5.11
- Fixed a crash when processing a truncated TAR file (#23).
- Added missing documentation for
LZMAProperties.init()
. - Windows platform is now supported.
Comment: Here, "supported" means that Windows builds are now performed in CI, and that attempts will be made to fix any reported Windows-specific issues. However, for the time being, only the latest released version of Swift is supported on Windows (Swift 5.4.1 at the time of this writing).
4.5.10
- Fixed compilation issues on Windows (PR #22 by @trametheka).
- Performed minor optimizations to BZip2 and Deflate compression functionality.
- Increased the lowest required version of BitByteData dependency to 1.4.4 (it fixed a compilation warning with modern Swift versions).
4.5.9
4.5.8
- Fixed incompatibility with Carthage
--use-xcframeworks
method of installing SWCompression (#18).
Comment: Please see the updated Carthage-related instructions in README for more details. Please also note that support for non-xcframework method of installing SWCompression using Carthage is likely to be dropped in the future major update.
- Pre-built binary Carthage archives are no longer published via Github Releases.
Comment: This is mainly because these binaries are currently incompatible with the --use-xcframeworks
Carthage option. In addition, they aren't really useful in general, since there is no binary compatibility of SWCompression built by different versions of compiler, and in most cases it was built by Carthage from source anyway.
4.5.7
In this update several crashes were fixed that could occur in certain edge cases. These include situations when trying to process a very small or clearly invalid data. In these cases an error is now thrown instead. Unfortunately, there aren't suitable errors for these types of situations in SWCompression and it is impossible to add new error cases to the existing enums in a patch release, and as such the errors that are thrown may look a bit out of place.
- Fixed a crash when trying to open a very small file as a 7-Zip container, a BZip2 "archive", a GZip archive (either when using
unarchive
ormultiUnarchive
), a LZMA "archive", a XZ archive (either when usingunarchive
orsplitUnarchive
), a ZIP container, or a Zlib archive. - Fixed a crash when trying to open an unexpectedly truncated file as a GZip or XZ archive.
- Fixed a crash when trying to open an invalid file as a ZIP container. The
ZipError.notFoundCentralDirectoryEnd
error is now thrown instead as was originally intended. - Fixed a crash when trying to read a GZip or Zlib header from a very small file.
- Fixed a compilation warning in BZip2.
4.5.6
4.5.5
- Fixed a crash when opening ZIP files created by Finder on certain versions of macOS.
Comment: ZIP files produced by Finder (or whatever it uses under the hood) on certain versions of macOS sometimes contain an Extended Timestamp extra field in their Central Directory which doesn't strictly conform to the specifications. More specifically, extended timestamp located in CD can only contain modification time, but Finder puts there access and creation times as well. When trying to open such files, SWCompression was crashing. Now, instead, SWCompression ignores these extra additions.