An Objective-C and Swift library for Brotli compression and decompression.
Via Cocoapods:
pod 'BrotliKit'
// compression
[myData compressBrotli];
// decompression
[myData decompressBrotli];
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];
CF_EXPORT CFDataRef LMCreateBrotliCompressedData(const void* bytes, CFIndex length, int16_t quality);
CF_EXPORT CFDataRef LMCreateBrotliDecompressedData(const void* bytes, CFIndex length, bool* isPartialInput);
MIT License. The original Brotli repository is also under the MIT license.