Re: CFHTTP API's and gzip transport
Re: CFHTTP API's and gzip transport
- Subject: Re: CFHTTP API's and gzip transport
- From: Jens Alfke <email@hidden>
- Date: Tue, 28 Oct 2008 17:16:47 -0700
On Oct 28, 2008, at 4:57 PM, Mark Thomas wrote:
Has any had any use with CFHTTP API's and then specify'ing in your
HTTP
header
Accept-Encoding: gzip, deflate
so your client can accept gzip data ?, Would CFHTTP API's deal
with this
for you ?
You mean the HTTP-related CFStream APIs? I don't think they handle
content encodings. You could set the header yourself, but then you'd
be responsible for decompressing the response yourself, too.
If you were to use the higher-level HTTP API in Foundation
(NSURLRequest, etc.), it does all that stuff for you. I'd recommend
using that API instead, unless for some reason you can't use Objective-
C or need really detailed control over the stream.
Or do you have to do this yourself, if so does
anybody know if it possible to decompress in chunks ?, or do you have
download everything and then decompress all in one go ?
The zlib API lets you decompress in chunks.
Also does anybody know if you are using https, will this compress
down
your data anyhow as part of the encrypting the data ?
No, encryption and compression are different things. If anything, I
think an SSL-encrypted stream is slightly larger than a plaintext one.
(But of course a gzip-compressed response can be sent over SSL
transparently.)
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden