I need to compress some binary files as quickly as possible with PHP - it needs to be reasonably fast and easy to use. What options can you fantastic people recommend? :)
Jamie
I need to compress some binary files as quickly as possible with PHP - it needs to be reasonably fast and easy to use. What options can you fantastic people recommend? :)
Jamie
If clients are going to be downloading these you can setup Apache to compress them as they are served.
If it is something where you are going to be storing them on the server you can PHPZip them.
I don't have any personal experience with them but there's a whole section in the docs on Compression and Archive Extensions
It looks like there are extensions for
If you're working directly with files on the server, the ZipArchive class (that comes with the Zip extension) looks like it might be the easiest to use.
If the extension is available on your server or if you can add it, LZF is what you're looking for. Otherwise, gzcompress() with a compression level of 3 or less will be plenty fast.