3.1.0
- Added support for multi-member GZip and multi-stream XZ archives.
Comment: This archives are essentially several separate archives concatenated into one file. Despite that, they are described in specifications for both GZip and XZ, so it is important to be able to open them. Story time: they were actually supported up until SWCompression 3.0 where it was removed because it was kind of a hidden functionality. Moreover, the resulted data from each part of multi-member archive were combined into singleData
object which was hard to use. But now there is a separatemultiunarchive(:)
function for these cases. - Added
entryAttributes
property to bothTarEntry
andZipEntry
.- This property allows access to various attributes such as modification time, POSIX permissions, entry type, etc.
- Existing separate
TarEntry
properties for these attributes are now considered deprecated and will be removed in 4.0. - This also means that
ZipEntry
's modification time, permissions, etc can be now accessed. - This property utilizes
FileAttributeKey
type from Foundation framework which provides relatively easy way of setting attributes of unpacked file throughFileManager.setAttributes
function. - This property also contains information about type of an entry.
FileAttributeType
values from Foundation are used for specifying it. entryAttributes
is going to be renamed toattributes
in 4.0.
- Added support in
TarEntry
for linked file path specified using PAX format. - Fixed several problems with decompressing LZMA compressed files from ZIP container.
- Fixed problem with discarding ZIP containers with
wrongVersion
error when they contain LZMA or BZip2 compressed files. - Encrypted ZIP containers should now be detected properly and error should be now thrown more consistently.
ZipError.compressionNotSupported
is now only thrown when trying to get entry's data and not when just opening an archive usingopen(:)
function.- Text fields from GZip header are now decoded more correctly.
Comment: Previously, SWCompression expected UTF-8 encoding in this fields, but according to specification this fields are encoded using ISO-Latin-1 encoding. In most real-life scenarios this mismatch was unlikely to cause any problem, but it was kind of incorrect behaviour and is now fixed. - Improved Deflate comrpession rate for some corner cases.
- Improved BZip2 performance for big data sizes.
Side notes.
- 'Know issues' section was added to README.
- Performance discussions, thoughts and notes about it were moved into a separate file.