NSData(zlib)

@interface NSData (zlib)

The NSData zlib category adds compress and uncompress methods to NSData.

  • Return a compressed version of the data.

    Declaration

    Objective-C

    - (NSData *)compressData;

    Swift

    func compress() -> Data!
  • Return an uncompressed verison of the given data

    Declaration

    Objective-C

    - (NSData *)uncompressGZip;

    Swift

    func uncompressGZip() -> Data!
  • Returns true if the data is zlib compressed

    Declaration

    Objective-C

    - (BOOL)isCompressed;

    Swift

    func isCompressed() -> Bool