Latest 0.0.7
Homepage https://github.com/tidwall/DeflateSwift
License Attribution License
Platforms ios 8.0, osx 10.9, requires ARC
Authors

Super simple interface for the deflate compression format in Swift. Two very easy to use classes, DeflateStream and InflateStream with only method write

Features

  • Pure Swift. No bridging with Objective-C
  • Simple Interface. Only two classes and one method required.
  • Advanced Options. Compression level a window bits.

Install (iOS and OS X)

CocoaPods

You can use CocoaPods to install the DelfateSwift framework.

Add the following lines to your Podfile.

use_frameworks!
pod 'DeflateSwift'

The import DeflateSwift directive is required in order to access DeflateSwift features.

Example

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)")

Contact

Josh Baker @tidwall

License

The DeflateSwift source code available under the MIT License.

Latest podspec

{
    "name": "DeflateSwift",
    "version": "0.0.7",
    "summary": "Simple interface for the deflate compression format in Swift.",
    "homepage": "https://github.com/tidwall/DeflateSwift",
    "license": {
        "type": "Attribution License",
        "file": "LICENSE"
    },
    "source": {
        "git": "https://github.com/tidwall/DeflateSwift.git",
        "tag": "0.0.7"
    },
    "authors": {
        "Josh Baker": "[email protected]"
    },
    "social_media_url": "https://twitter.com/tidwall",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source_files": "deflate.swift",
    "requires_arc": true,
    "libraries": "z"
}

Pin It on Pinterest

Share This