Latest 1.0.1
Homepage https://github.com/luckymarmot/BrotliKit
License MIT
Platforms ios 8.0, osx 10.8, requires ARC
Authors

An Objective-C and Swift library for Brotli compression and decompression.

Installation

Via Cocoapods:

pod 'BrotliKit'

Usage

NSData category

// compression
[myData compressBrotli];

// decompression
[myData decompressBrotli];

Compressor class

Simple usage

// compression
[LMBrotliCompressor compressedDataWithData:myData];

// decompression
[LMBrotliCompressor decompressedDataWithData:myData];

Compression quality

// compression
[LMBrotliCompressor compressedDataWithData:myData quality:11];

Decompressing partial inputs

// decompression
BOOL isPartialInput;
[LMBrotliCompressor decompressedDataWithData:myData isPartialInput:&isPartialInput];

Core Foundation API

CF_EXPORT CFDataRef LMCreateBrotliCompressedData(const void* bytes, CFIndex length, int16_t quality);
CF_EXPORT CFDataRef LMCreateBrotliDecompressedData(const void* bytes, CFIndex length, bool* isPartialInput);

License

MIT License. The original Brotli repository is also under the MIT license.

Latest podspec

{
    "name": "BrotliKit",
    "version": "1.0.1",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "A Swift and Objective-C category for Brotli compression.",
    "homepage": "https://github.com/luckymarmot/BrotliKit",
    "authors": {
        "Paw": "https://paw.cloud"
    },
    "source": {
        "git": "https://github.com/luckymarmot/BrotliKit.git",
        "tag": "1.0.1",
        "submodules": true
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.8"
    },
    "requires_arc": true,
    "source_files": [
        "BrotliKit/*.{h,m,c}",
        "Dependencies/brotli/c/common/*.{c,h}",
        "Dependencies/brotli/c/dec/*.{c,h}",
        "Dependencies/brotli/c/enc/*.{c,h}"
    ],
    "preserve_paths": "Dependencies/brotli/c/include/brotli/*.h",
    "public_header_files": "BrotliKit/*.h",
    "pod_target_xcconfig": {
        "HEADER_SEARCH_PATHS": ""$(PODS_TARGET_SRCROOT)/Dependencies/brotli/c/include" "$(PODS_ROOT)/BrotliKit/Dependencies/brotli/c/include"",
        "CLANG_WARN_UNREACHABLE_CODE": false
    }
}

Pin It on Pinterest

Share This