The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
## Minor release changes
- Add new error `CompressNIOError.inputBufferOverflow` for when decompression requires more data from the input buffer.
- Ignore `CompressNIOError.inputBufferOverflow` errors when decompressing a stream of data
## Patch release changes
- Remove platform requirements added in v1.1.0
## Minor release changes
- Add versions of `compressStream` and `decompressStream` that take an async closure
No changes from v0.6.0.
## 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
```swift
let compressed = try buffer.compress(with: .gzip(configuration: .init(windowSize: 15, compressionLevel: 9)))
```
## Breaking changes
- `CompressionAlgorithm.compressor` is a function which takes a window bits size instead of a computed property.
- `CompressionAlgorithm.decompressor` is a function which takes a window bits size instead of a computed property.
- Added `maxSize` parameter to `ByteBuffer.decompress(with:allocator:)` and `ByteBuffer.decompressStream(with:allocator:)`
## Minor release changes
- Add `CompressionAlgorithm.rawDeflate` for raw deflate data without a header.
- Fix Swift 5.4 warnings
- Allow `ByteBuffer.compress(with:flush:process)` to be called multiple times within one compression stream.
- Added `NIOCompressor.finishWindowedStream` to avoid having to create an empty ByteBuffer to finish a windowed compress.
- Removed LZ4 support
- Replace `finalise` bool parameter in `compressStream` functions with `flush` enum `CompressNIOFlush` which can be `.no` meaning compressor chooses when to flush, `.sync` meaning compressor input and output are in sync or `.finish` meaning I've finished compressing data.
- Added window based compressStream/decompressStream functions. Provide a working window buffer to the compressor/decompressor and it will call a closure everytime the compress/decompress function fills that buffer.
- compress functions only throw `.bufferOverflow` when neither input or output can be processed.
- Added LZ4 support
- Added `NIOCompressor.resetStream` to support more optimal way to reset stream