Which compression method to use in PHP?

前端 未结 4 1823
抹茶落季
抹茶落季 2020-11-30 21:41

I have a large amount of data to move using two PHP scripts: one on the client side using a command line PHP script and other behind Apache. I POST the data to the server si

4条回答
  •  萌比男神i
    2020-11-30 22:24

    I had to decompress a gzip compressed file in PHP with C++. I found out that the PHP gzencode and its counterpart gzdecode use the Z_NO_FLUSH method and at the end of the block of the data to encode/decode, applies Z_FINISH. The example/tutorial in C shown on the zlib website can be used to decompress and compress gziped files from PHP, as long as the windows bit and the memory level is changed to allow gzip deflations and inflations.

    Extra: It seems most people in this thread have no idea what "Compression method" meant.

提交回复
热议问题