Declared in NSData+Compression.h
NSData+Compression.m

Overview

Adds compression and decompression messages to NSData. Methods extracted from source given at http://www.cocoadev.com/index.pl?NSDataCategory

Tasks

  • – zlibInflate

    Returns a data object containing a Zlib decompressed copy of the receivers contents.

  • – zlibDeflate

    Returns a data object containing a Zlib compressed copy of the receivers contents.

  • – zlibInflateInto:offset:

    Inflates the data into a given buffer starting at a certain offset.

  • – gzipInflate

    Returns a data object containing a Gzip decompressed copy of the receivers contents.

  • – gzipDeflate

    Returns a data object containing a Gzip compressed copy of the receivers contents.

Instance Methods

gzipDeflate

Returns a data object containing a Gzip compressed copy of the receivers contents.

- (NSData *)gzipDeflate

Return Value

A data object containing a Gzip compressed copy of the receivers contents.

Discussion

Returns a data object containing a Gzip compressed copy of the receivers contents.

Declared In

NSData+Compression.h

gzipInflate

Returns a data object containing a Gzip decompressed copy of the receivers contents.

- (NSData *)gzipInflate

Return Value

A data object containing a Gzip decompressed copy of the receivers contents.

Discussion

Returns a data object containing a Gzip decompressed copy of the receivers contents.

Declared In

NSData+Compression.h

zlibDeflate

Returns a data object containing a Zlib compressed copy of the receivers contents.

- (NSData *)zlibDeflate

Return Value

A data object containing a Zlib compressed copy of the receivers contents.

Discussion

Returns a data object containing a Zlib compressed copy of the receivers contents.

Declared In

NSData+Compression.h

zlibInflate

Returns a data object containing a Zlib decompressed copy of the receivers contents.

- (NSData *)zlibInflate

Return Value

A data object containing a Zlib decompressed copy of the receivers contents.

Discussion

Returns a data object containing a Zlib decompressed copy of the receivers contents.

Declared In

NSData+Compression.h

zlibInflateInto:offset:

Inflates the data into a given buffer starting at a certain offset.

- (int)zlibInflateInto:(NSMutableData *)buffer offset:(NSUInteger)offset

Parameters

buffer

A pointer to an instance of NSMutableData to popluated with the inflated data.

offset

The offset at which to start reading from [self bytes]

Return Value

The number of bytes consumed \internal This method is not part of the original cocoadev.com source

Discussion

Inflates the data into a given buffer starting at a certain offset.

Declared In

NSData+Compression.h