Skip to content

3.4.0

Compare
Choose a tag to compare
@tsolomko tsolomko released this 03 Oct 19:28
· 1267 commits to develop since this release
v3.4.0
7c03fc7
  • Implementation of BZip2 compression algorithm.
    • There is also an auxiliary function BZip2.compress(data:blockSize:) if you need to specify size of input data block.
    • Default block size is 100 Kilobytes.
  • Added CompressionAlgorithm protocol.
  • Deflate now conforms to CompressionAlgorithm protocol (as well as BZip2).
  • Deflate.compress(data:) and ZlibArchive.archive(data:) no longer throw, but can crash with fatalError().
    Comment: Though unlikely to happen, it seems more logical to crash with fatalError() when problems occur during compression instead of error throwing because it indicates there is a problem with the code itself, not with the input data.
  • Fixed crash in some rare cases for corrupted BZip2 archives. It now throws BZip2Error instead.