NSData(Extensions) Category Reference

Declared in NSData+Extensions.h

Overview

NSData extensions.

+ dataFromBase64String:

Creates an NSData object by deserialising a base-64 string.

+ (nonnull NSData *)dataFromBase64String:(nonnull NSString *)aString

Parameters

aString

The base-64 string to deserialise.

Return Value

The deserialised NSData.

Declared In

NSData+Extensions.h

+ dataFromBase64Data:

Creates an NSData object by deserialising a base-64 NSData object.

+ (nonnull NSData *)dataFromBase64Data:(nonnull NSData *)base64Data

Parameters

base64Data

The base-64 data to deserialise.

Return Value

The deserialised NSData.

Declared In

NSData+Extensions.h

+ fromDispatchData:

Reads the data from a dispatch_data_t into a new NSData.

+ (nonnull NSData *)fromDispatchData:(nonnull dispatch_data_t)data

Parameters

data

The dispatch_data_t object to read from.

Return Value

The new NSData.

Declared In

NSData+Extensions.h

– utf8StringValue

The UTF8 string representation of the contents of this NSData.

- (nonnull NSString *)utf8StringValue

Declared In

NSData+Extensions.h

– base64StringValue

The base-64 string representation of the contents of this NSData.

- (nonnull NSString *)base64StringValue

Declared In

NSData+Extensions.h

– md5StringValue

An MD5 hash of the contents of this NSData.

- (nonnull NSString *)md5StringValue

Declared In

NSData+Extensions.h

– gzipInflate

Unzips the data in this NSData using the GZip algorithm, returning the inflated data.

- (nullable NSData *)gzipInflate

Return Value

The new NSData containing the unzipped (inflated) data.

Declared In

NSData+Extensions.h

– gzipDeflate

Zips the data in this NSData using the GZip algorithm, returning the zipped (deflated) data.

- (nonnull NSData *)gzipDeflate

Return Value

The new NSData containing the zipped (deflated) data.

Declared In

NSData+Extensions.h