Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 1018 Bytes

README.md

File metadata and controls

53 lines (35 loc) · 1018 Bytes

ZstdKit

An Objective-C and Swift library for Zstd (Zstandard) compression and decompression.

Installation

Via Cocoapods:

pod 'ZstdKit'

Usage

NSData category

// compression
[myData compressZstd];

// decompression
[myData decompressZstd];

Compressor class

Simple usage

// compression
[LMZstdCompressor compressedDataWithData:myData];

// decompression
[LMZstdCompressor decompressedDataWithData:myData];

Compression level

// compression
[LMZstdCompressor compressedDataWithData:myData compressionLevel:3];

Core Foundation API

CF_EXPORT CFDataRef LMCreateZstdCompressedData(const void* bytes, CFIndex length, int16_t compressionLevel);
CF_EXPORT CFDataRef LMCreateZstdDecompressedData(const void* bytes, CFIndex length);

License

The original Zstandard code is licensed under the BSD license. This code is licensed under the MIT license.