Skip to content

v0.6.0

Compare
Choose a tag to compare
@adam-fowler adam-fowler released this 14 Jun 14:32
· 5 commits to main since this release
0223872

Breaking changes

  • Renamed compression algorithms. They now follow the naming convention zlib uses:
    • gzip: deflate data with gzip header
    • zlib: deflate data with zlib header
    • deflate. raw deflate data without header
    • Previously zlib was called deflate because that was the required format when deflate was indicated in an HTTP header.
      WARNING: If you previously used deflate to generate HTTP deflate format compression, you should change this to zlib.
  • Algorithm configuration is required when creating the algorithm instead of when you create the decompressor or compressor.
  • Added ZlibConfiguration for zlib compression types with windowSize, compressionLevel, memoryLevel and strategy values.

Below is an example of compressing a ByteBuffer with the above changes

let compressed = try buffer.compress(with: .gzip(configuration: .init(windowSize: 15, compressionLevel: 9)))