You will not be able to decode it in PHP. For a cross platform solution you can use B4A / B4J / B4i WriteB4XObject (it will not work with PHP).
You can compress bytes with CompressedStreams or the Archiver library and then read it from the PHP server.