v0.6.0
Breaking changes
- Renamed compression algorithms. They now follow the naming convention zlib uses:
gzip
: deflate data with gzip headerzlib
: deflate data with zlib headerdeflate
. raw deflate data without header- Previously
zlib
was calleddeflate
because that was the required format when deflate was indicated in an HTTP header.
WARNING: If you previously useddeflate
to generate HTTPdeflate
format compression, you should change this tozlib
.
- 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)))