Skip to content

3.1.0

Compare
Choose a tag to compare
@tsolomko tsolomko released this 03 Jul 15:46
· 1551 commits to develop since this release
v3.1.0
1ae622f
  • 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 single Data object which was hard to use. But now there is a separate multiunarchive(:) function for these cases.
  • Added entryAttributes property to both TarEntry and ZipEntry.
    • 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 through FileManager.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 to attributes 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 using open(:) 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.

  1. 'Know issues' section was added to README.
  2. Performance discussions, thoughts and notes about it were moved into a separate file.