compression library for c and php

To save network traffic I'd like to compress my data. The only trick is that I the client is a c application and the server is php. I'm looking for an open source compression library that's available for both c and php.

I guess I could write an external c application to decompress my data, but I'm trying to avoid spawning extra processes on the server.

If you know of any, please post it!

Answers


Zlib/a provides C APIs, and is part of the PHP functional API as well.


gzip is one of the most (if not the most) popular compression scheme. PHP has supported it since version 4. If you need even better compression, consider bzip2.


Php supports zlib compression and for the c compression you could use zlib, but you should think again if you want to compress network communication - the load will probably be too much for your servers.


Need Your Help

Ruby on Rails Controller WHERE statement

ruby-on-rails ruby

I am searching the database for a unique key and I am getting it back but as an array I then have to take the first object and send that to my view

Parallelizing the “Reduce” in “MapReduce”

multithreading optimization map multicore reduce

I understand how Map is easily parallelizable - each computer/CPU can just operate on a small portion of the array.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.