forked from 1024jp/GzipSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
40 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "GzipSwift" | ||
s.version = "3.1.2" | ||
s.version = "3.1.3" | ||
s.summary = "Swift framework that enables gzip/gunzip Data using zlib." | ||
|
||
s.homepage = "https://github.com/1024jp/GzipSwift" | ||
s.license = { :type => "MIT", | ||
:file => "LICENSE" } | ||
s.author = { "1024jp" => "[email protected]" } | ||
s.social_media_url = "https://twitter.com/1024jp" | ||
|
||
s.source = { :git => "https://github.com/1024jp/GzipSwift.git", | ||
:tag => s.version } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,9 @@ GzipSwift | |
======================== | ||
|
||
[![Swift](https://img.shields.io/badge/Swift-3.0.1-blue.svg)]() | ||
[![platform](https://img.shields.io/badge/platform-macOS | iOS | watchOS | tvOS | Linux-blue.svg)]() | ||
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) | ||
[![platform](https://img.shields.io/badge/platform-macOS|iOS|watchOS|tvOS|Linux-blue.svg)]() | ||
[![Carthage compatible](https://img.shields.io/badge/Carthage-✔-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) | ||
[![SPM compatible](https://img.shields.io/badge/SPM-✔-4BC51D.svg?style=flat)](https://swift.org/package-manager/) | ||
[![CocoaPods compatible](http://img.shields.io/cocoapods/v/GzipSwift.svg?style=flat)](http://cocoadocs.org/docsets/GzipSwift) | ||
[![Build Status](https://img.shields.io/travis/1024jp/GzipSwift/master.svg?style=flat)](https://travis-ci.org/1024jp/GzipSwift) | ||
[![codecov.io](https://codecov.io/gh/1024jp/GzipSwift/branch/master/graphs/badge.svg)](https://codecov.io/gh/1024jp/GzipSwift) | ||
|
@@ -32,44 +33,41 @@ if data.isGzipped { | |
} else { | ||
decompressedData = data | ||
} | ||
|
||
// check data is gzipped | ||
print(compressedData.isGzipped) | ||
``` | ||
|
||
|
||
## Installation | ||
|
||
1. Build Gzip framework. | ||
3. In *Build Phases*, add `Gzip.framework` library to your project. | ||
<br /><img src="Documentation/[email protected]" height="150"/> | ||
5. `import Gzip` in your Swift file. | ||
6. Use in your code. | ||
1. Open Gzip.xcodeproj on Xcode and build Gzip framework for your target platform. | ||
2. Append the built `Gzip.framework` to your project. | ||
3. Go to __General__ pane of the application target in your project. Add `Gzip.framework` to the __Embedded Binaries__ section. | ||
<br /><img src="Documentation/[email protected]" height="135"/> | ||
4. `import Gzip` in your Swift file and use in your code. | ||
|
||
### Build via Carthage | ||
GzipSwift is Carthage compatible. You can easily build GzipSwift adding the following line to your Cartfile. | ||
### Carthage | ||
GzipSwift is [Carthage](https://github.com/Carthage/Carthage) compatible. You can easily build GzipSwift adding the following line to your `Cartfile`: | ||
|
||
```ruby | ||
github "1024jp/GzipSwift" | ||
``` | ||
|
||
### Build via CocoaPods | ||
### CocoaPods | ||
GzipSwift is available through [CocoaPods](http://cocoapods.org). To install | ||
it, simply add the following line to your Podfile: | ||
it, simply add the following line to your `Podfile`: | ||
|
||
```ruby | ||
pod "GzipSwift" | ||
pod 'GzipSwift' | ||
``` | ||
|
||
### For Linux platform with swift package manager | ||
### Swift Package Manager | ||
|
||
1. First you need to install zlib if you haven't installed yet: | ||
|
||
```bash | ||
$ apt-get install zlib-dev | ||
``` | ||
2. add this packge to your package.swift | ||
|
||
3. if swift build failed with a linker error: | ||
2. Add this package to your package.swift. | ||
3. If Swift build failed with a linker error: | ||
* check if libz.so is in your /usr/local/lib | ||
* if no, reinstall zlib as step (1) | ||
* if yes, link the library manually by passing '-Xlinker -L/usr/local/lib' with `swift build` | ||
|