ZstdKit
ZstdKit copied to clipboard
An Objective-C and Swift library for Zstd (Zstandard) compression and decompression.
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.