Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

compression library for c and php

Tags:

c

php

compression

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!

like image 922
lajos Avatar asked Jun 24 '26 22:06

lajos


2 Answers

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.

like image 154
Jonah Braun Avatar answered Jun 27 '26 12:06

Jonah Braun


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

like image 42
DGentry Avatar answered Jun 27 '26 13:06

DGentry