Is there a compression library that has both PHP and JavaScript implementation, such that I can compress/decompress from/to JavaScript/PHP interchangeably?
I know there are different options to compress data with PHP or JavaScript, the problem is that they store their output with different metadata. This means for example, that if some data is compressed into file output.bin using PHP, once I read output.bin using JavaScript (ajax) there is no way I can decompress that stream.
PS: I’m not looking for compression of HTTP requests, I have a bunch of compressed files (throught PHP) which I need to retrieve and decompress using JavaScript.
Thanks
I don’t know if something like node.js would fit into your scheme, but it provides fast zlib compression and decompression. php has zlib as well, so that would meet your requirements. If you need a zlib clone written entirely in Javascript, there are several out there that show up in a google search. However I don’t know if any are complete or correct.