How do I set up a NodeJS + Actionscript 3.0 with sockets & communication through gzipped JSON?

I am trying to set up a server in NodeJS and a client in actionscript 3.

So far I successfully made it so that I send a stringified JSON to NodeJS and it replies the same message, but now I want this communication to happen with gzipped stringified JSON.

i tried using nodeJS's zlib module but I couldn't decompress it. really, several days trying deflate(in nodejs)/inflate(as3's byearray), gzip(nodejs)/gunzip(got a swc from adobe) and nothing.

Furthermore, with sending the gzipped 90kb, sometimes it only arrives in ~30 kb quantity.

I have attached the as 3 project in flash builder and my script if this helps. http://dfiles.eu/files/e2x3e3fir

Thank you in advance!