how to gzip the data and send through photon cloud service?

edited March 2012 in Native
i am sending lot of data(almost in the form of nsstring) between the users. Is there is anyway that we can able to send the gziped data through photon cloud service in ios?

Comments

  • Sending an EGArray of NSValue with nByte values should be the best option for sending compressed data.
    No worry about the overhead of having an NSValue for every byte of data: This is just in the API. Actually sent data will just be 2 bytes for the array size, 1 byte for the data type of the array elements and aside from that just the actual bytes of compressed data.
    In theory you could also use a NSArray instead of an EGArray, but as a NSArray doesn't guarantee, that all its elements have the same types, we would have to add a type-byte for every element not only for the complete array like with EGArray, so for your usage scenario EGArray will give by way the superior network performance.
Sign In or Register to comment.