TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | Custom |
ReleasedLast Release | Feb 2016 |
SPMSupports SPM | ✗ |
Maintained by Josh Baker.
Super simple interface for the deflate compression format in Swift. Two very easy to use classes, DeflateStream
and InflateStream
with only method write
import DeflateSwift
var data : [UInt8] = [ /* some data here */ ]
// compress
var deflater = DeflateStream()
var (deflated, err) = deflater.write(data, flush: true)
if err != nil{
fatalError("\(err!)")
}
// decompress
var inflater = InflateStream()
var (inflated, err) = inflater.write(deflated, flush: true)
if err != nil{
fatalError("\(err!)")
}
println("success: \(inflated == data)")
Josh Baker @tidwall
The DeflateSwift source code available under the MIT License.