• Stars
    star
    531
  • Rank 83,526 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Swift package that enables gzip/gunzip Data using zlib

GzipSwift

platform CI Status SwiftPM-compatible

GzipSwift is a framework with an extension of Data written in Swift. It enables compress/decompress gzip using zlib.

GzipSwift requires no privacy manifests since it does not access to any privacy information.

Usage

import Gzip

// gzip
let compressedData: Data = try! data.gzipped()
let optimizedData: Data = try! data.gzipped(level: .bestCompression)

// gunzip
let decompressedData: Data
if data.isGzipped {
    decompressedData = try! data.gunzipped()
} else {
    decompressedData = data
}

Installation

GzipSwift is SwiftPM-compatible. To install, add this package to your Package.swift or your Xcode project.

dependencies: [
    .package(name: "Gzip", url: "https://github.com/1024jp/GzipSwift", from: Version(6, 0, 0)),
],

For Linux

  1. Install zlib if you haven't installed yet:

    $ apt-get install zlib-dev
  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

License

© 2014-2024 1024jp

GzipSwift is distributed under the terms of the MIT License. See LICENSE for details.

More Repositories

1

WFColorCode

NSColor extension adding ability to handle HSL color space and CSS3 style color codes
Swift
27
star
2

LensCalibrator

Convert coordinates in a picture to the real world based on multiple reference points in the picture.
Python
22
star
3

PlainEdit

Super simple text editor for macOS
Swift
12
star
4

svg-coteditor

pretty CotEditor macro suite for SVG editting
AppleScript
8
star
5

Preferences-Demo

Demo application to demonstrate implementing a standard preferences window in native macOS applications
Swift
5
star
6

CocoaDeveloperSet-coteditor

CotEditor syntax style set for Cocoa developers
4
star
7

python-coteditor

CotEditor script set for Python
Python
4
star
8

AnsiStyle

A small Swift library to style strings for the standard output
Swift
3
star
9

MarkupParser

Generic Swift parser framework for lightweight markup languages
Swift
3
star
10

HTML5-coteditor

CotEditor syntax styles for HTML5
3
star
11

multiComment-CotEditor

multi-language comment-out macro for CotEditor
AppleScript
3
star
12

gnuplot-coteditor

CotEditor syntax style for gnuplot
2
star
13

weatherIcon-geeklet

Geeklet to display your original weather forecast icons
Perl
2
star
14

MATLAB-coteditor

CotEditor syntax style for MATLAB
2
star
15

CommandLineBundleSample

Sample project to show the issue with sandboxed command-line tool
Objective-C
1
star
16

ImageJ-coteditor

CotEditor syntax style for ImageJ Macro
1
star
17

JCS-Subtitle

Japanese subtitle of the musical “Jesus Christ Superstar” (Arena Tour 2012) in SubRip format
1
star
18

bubbleHatenabookmarkButton

公式のはてなブックマークボタンのブックマーク数の表示をTwitterやFacebookなどのボタンのような吹き出しスタイルに強制的に変換するJavaScript。 要jQuery。
JavaScript
1
star