Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone, JSon and Compression

I'm building an iPhone app that's going to be sending and receiving large amounts of data to and from a server. I'm using JSon to get the data. I was wondering if it's possible to also use some sort of compression on the received data in order to try to speed up the process a little bit. If so, which kind of compression works best with JSon, and where can I find more info on it?

Thanks,

like image 646
Rony Rozen Avatar asked Jun 20 '10 12:06

Rony Rozen


People also ask

Can JSON files be compressed?

As text data, JSON data compresses nicely. That's why gzip is our first option to reduce the JSON data size. Moreover, it can be automatically applied in HTTP, the common protocol for sending and receiving JSON. Let's take the JSON produced with the default Jackson options and compress it with gzip.

What is the iOS compression?

Available in iOS 9.0+ and macOS 10.11+, Compression simplifies the process of leveraging a number of common compression algorithms such as ZLIB, LZMA, LZFSE, and LZ4.


1 Answers

late for party but just in case anyone looking for. Use ASIHTTPRequest which has inbuilt supports for the gzip compression. this will save overhead of handling decompression. gzip at ASIHTTPRequest

like image 129
k-thorat Avatar answered Nov 10 '22 17:11

k-thorat