Compression library for c and php

To save network traffic, I would like to compress my data. The only trick is that I am the client application c, and the server is php. I am looking for an open source library available for both c and php.

I think I could write an external application c to unpack my data, but I try to avoid the appearance of additional processes on the server.

If you know, please send it!

+3
source share
6 answers

Zlib provides a C API and is also part of the functional PHP API.

+2
source

gzip - ( ) . PHP 4. , bzip2.

+4

Php zlib c zlib, , - , , .

+2

ZLIB

zlib PHP.

+1

, - HTTP, . Apache mod_deflate.

+1

it depends on what data you transfer. If this is text, use mod_gzip for apache (I assume you use it). I saw about 70% text compression with this. But if you are dealing with binary data, such as images and videos, use media formats that are more compressed.

+1
source

Source: https://habr.com/ru/post/1697428/


All Articles