AMF is great for serializing AS3 objects. Its compact binary format is far more efficient than XML or JSON and it’s just as easy to use: just call writeObject
or readObject
. However, there are many ways to make it even more efficient. Today’s article presents one more way that eliminates some overhead you might not have thought out. Read on to learn more and for a helper class that will enable you to avoid it.
Posts Tagged amf
To save precious bandwidth, keeping your AMF data size small is crucial. By default, AMF has a tendency to create bloated data sizes. In the last article, I showed a way to shrink your class names to a single character when stored in AMF data. Today I’ll show a you a trick to shrink your class field names to a single character. Read on to find out how.
I’ve talked about AMF serialization size before, but there’s one tip I left out. Today’s article shows you one crucial step you need to take to make sure your AMF data is packed as tightly as possible so you’re not wasting file size or bandwidth.
AMF is great in its stock configuration, but there are some little-known tricks to make it even better. Today’s article shows you how to customize the serialization and deserialization of objects to achieve even smaller file sizes and gain maximum control.
We know that you can automatically serialize anything to a ByteArray
and that it’s faster and smaller than XML or JSON, but why is it so much smaller? Today’s article investigates a bit and reveals the secret that makes it such an efficient format and how that can save you a lot of manual work when it comes time to deserialize the ByteArray
.