Compress NSString in Cocoa and uncompress in PHP -


i send large nsstrings cocoa php.

can use bzlib library compress these strings on fly (therefore compress in memory, not disk), , able uncompress them in php ?

if yes, reference code/function available ?

thanks.

you don't want send nsstring objects cocoa php. i'm guessing want send payload strings within objects cocoa app php script on server , compress string in transit in order minimize network bandwidth. laudable goal.

on cocoa side, use bzip2 library , associated programming manual implement compression. news here should able compression entirely in memory using bz2_bzcompressinit, bz2_bzcompress, , bz2_bzcompressend. also, mentioned cocoa vs. cocoa touch, if you're planning submit app store, heed post's advice , statically link bzip2 library.

on php side, follow documentation decompress file. downside here it's apparently necessary save bzip2 string temporary file before decompressing it.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -