NSData *data = ...;
NSData *compressed = [data brotliCompressed];NSData *compressed = ...;
NSData *decompressed = [compressed brotliDecompressed];Brotli is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Brotli'Karl von Randow, karl@xk72.com
Brotli is available under the MIT license. See the LICENSE file for more info. Brotli includes the official Brotli source code from https://github.com/google/brotli. That source code is covered by the official Brotli license, which is included in the LICENSE file.
在Xcode中,选择 File > Add Package Dependencies,然后输入:
https://github.com/your-username/Brotli.git
import Brotli
// 使用Brotli SDK的功能- iOS 11.0+
- Xcode 12.0+
- Swift 5.5+
请查看 LICENSE 文件了解详细信息。