ROZlib

Overview

This class is a simple Objective C wrapper around ZLib compression library. It allows to compress and decompress the data easily eliminating the need to operate with C language functions and data structures.
The class is used to provide ROBinMessage class with the data compression ability.

Location

Class Methods


zlibDeflateData:fromOffset:toData:

+ (void) zlibDeflateData:(NSData *)sourceData fromOffset:(long)aOffset toData:(NSMutableData *)aData

Parameters:

  • sourceData:
  • aOffset:
  • aData:

zlibDeflateData:toData:

Compresses the source data object content and appends the result of the compression to the mutable data object.

+ (void) zlibDeflateData:(NSData *)sourceData toData:(NSMutableData *)targetData

Parameters:

  • sourceData: The data to compress.
  • targetData:

zlibInflateData:fromOffset:

Decompresses the data passed to the method starting with the specified offset. Returns the data object with the decompressed data.

+ (NSData *) zlibInflateData:(NSData *)data fromOffset:(long)aOffset

Parameters:

  • data: The data to decompress.
  • aOffset: The offset in the input data to start decompression from.

zlibInflateData:fromOffset:toData:

+ (int) zlibInflateData:(NSData *)data fromOffset:(long)aOffset toData:(NSData **)aOutData

Parameters:

  • data:
  • aOffset:
  • aOutData: