PHP compression options

I need to compress some binaries as fast as possible with PHP - it should be fast enough and easy to use. What options can you suggest to your fantastic people? :)

Jamie

+2


source to share


3 answers


I have no personal experience with them, but there is a whole section in the docs on Compression and Archiving Extensions

It looks like there are extensions for



If you're working directly with files on the server, the ZipArchive class (which comes with the Zip extension) looks like this: it might be the easiest to use.

+2


source


If clients will download them, you can configure Apache to compress them as they are served.



If this is where you are going to store them on the server, you can PHPZip them.

0


source


If an extension is available on your server, or if you can add it, LZF is what you are looking for. Otherwise gzcompress () with a compression ratio of 3 or less will be pretty fast.

0


source







All Articles