How would one compress a byte array byte[] in java and then uncompress it in as3 and vice-versa?
Can someone provide example code?
I am trying to transfer JSON strings between the 2 platform but JSON has a large overheard and I see it can be compressed.
So far I’ve come across the following to use:
GZipOutputStream in Java and ByteArray.uncompress in AS3
Maybe there is a better compression algorithm. I looked into the ByteArray class of AS3 and I don’t see gzip as a supported algorithm.
You should use the zlib format on both ends (as opposed to gzip), since as noted, the AS3 ByteArray class supports it directly.
On the Java end, use the Deflater class in java.util.zip.