Instance Method


Sent when a download object determines that the downloaded file is encoded to inquire whether the file should be automatically decoded.


- (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType;



The URL download object sending the message.


The type of encoding used by the downloaded file. The supported encoding formats are MacBinary ("application/macbinary"), Binhex ("application/mac-binhex40") and gzip ("application/gzip").

Return Value

YES to decode the file, NO otherwise.


The delegate may receive this message more than once if the file has been encoded multiple times. This method is not called if the downloaded file is not encoded.

See Also

Download Data and Responses

- download:decideDestinationWithSuggestedFilename:

The delegate receives this message when download has determined a suggested filename for the downloaded file.

- downloadDidBegin:

Sent immediately after a download object begins a download.

- download:didCreateDestination:

Sent when the destination file is created.

- download:didReceiveResponse:

Sent when a download object has received sufficient load data to construct the NSURLResponse object for the download.

- download:didReceiveDataOfLength:

Sent as a download object receives data incrementally.

- download:willResumeWithResponse:fromByte:

Sent when a download object has received a response from the server after attempting to resume a download.

- download:willSendRequest:redirectResponse:

Sent when the download object determines that it must change URLs in order to continue loading a request.