I haven't seen any documentation on the topic, but that doesn't mean it doesn't exist.
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Try this: https://github.com/mattt/Godzippa It was helpful for me.
Swift 3 ready wrapper around libcompression. https://github.com/mw99/SwiftDataCompression
Interesting to play with in the playground: playground compression rates
Following @Zaph & @Brad Larson's posts, below are the 2 methods
gzipInflate
andgzipDeflate
that work just fine to compress/decompressNSData
. (code reformatted from cocoadev.com/wiki/NSDataCategoryFrom the log:
I have made a nice Objective-C BZip2 compression interface available as a CocoaPod: https://github.com/blakewatters/BZipCompression
Starting with iOS 9.0, there is built-in support for a few more compression algorithms. The library is called libcompression and supports LZ4, LZMA, ZLIB and LZFSE.
Here’s a Swift example of using libcompression to decompress LZMA. It’s verbose, but avoids external dependencies and could be hidden in an extension on
NSData
.Yes, compress the data with zlib.
@Brad Larson posted on this: see here and added the code as well.
There is a CocoaPod which uses Objective-Zip by flyingdolphinstudio.