3 Replies Latest reply on Apr 20, 2008 4:34 PM by buabco

    ByteArray Compress

    buabco Level 1
      It seems that bytearray compress uses a different algorithm than the one used by PHP anyone knows of any PHP class to uncompress a compressed bytearray?

        • 1. Re: ByteArray Compress
          It says Flex uses zlib... "Compresses the byte array using zlib compression. The entire byte array is compressed."

          PHP has zlib functions..i.e http://www.phpdig.net/ref/rn69.html
          I've never done this..but it should work..zlib is just a standard compression algorithm..Pls let me know how it goes..I will use this soon.
          • 2. ByteArray Compress
            buabco Level 1

            I'm afraid it didn't work, if I take a bytearray, and compress it with the compress function, and the take the byte list and pass it to PHP (To do this I base64encoded it so I can do copy paste from Actionscript to PHP code), then used the base64_decode and use gzinflate on php to uncompress it, it doesn't work. More so, both functions (PHP and Actionscript) use the same specification, so I don't know what should I add to the compressed code to be able to uncompress it when on php.

            hope someone of Adobe sees this and is able to add more light on how the compress function works, the compress function on PHP takes a compression level function, but actionscript doesn't so my first question is what conpression level is been use by the actionscript code.
            • 3. Re: ByteArray Compress
              buabco Level 1
              Finally, it worked with PHP you have to use gzuncompress