GZip compression is not part of AMF!
I have read a couple ranting emails, tweets, and blog posts about why Zend Amf does not have gzip compression; “Wade what a waste!” is my favorite one. The reality is that the AMF protocol does not have gzip compression, there is no DEFLATE call, and if you read the protocol you can find no mention of such a thing. When AMFPHP added AMF3 support it also added a php based gzip support in the same release. Hence AMFPHP now with AMF3 and Gzip compression; mutually exclusive rumor started. The compression of HTTP which is the envelop that that AMF data is transported through does not mean that AMF is compressed. This is no different than the plethora of other http service end points such as Soap, JSON, REST, XMLRPC, etc which all benefit from a properly configured web server.
If you run apache check out mod_deflate. With this approach, you tell the server what content types should be compressed, and the server does it transparently to your application. Apache is a heck of a lot faster at doing the compression than adding PHP code that uses gzcompress.
Hope this helps… and please no dirty names for someone that’s just trying to give you some free code. Go get Live Cycle DS dude!


I always thought that AMF was a binary protocol. So one could argue the performance gain you have when compression is on.
Just keep up the good work your are doing (i know that i appreciate it!)
-Gerton
AMF although being a binary protocol doesnt guarantee that the data trasnferred accross the wire is either compresses or in binary for.
Consider that the amf call actualy returns the XML string.
The network packet actually contains XML data along with all the notes.
This means you will carry all the XML data with the repeated node information causing bloat on the network