<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web 2.1 &#187; Adobe</title>
	<atom:link href="http://web.2point1.com/tag/adobe/feed/" rel="self" type="application/rss+xml" />
	<link>http://web.2point1.com</link>
	<description>Tim Whitlock&#039;s home in the Blogohedron</description>
	<lastBuildDate>Sat, 04 Sep 2010 20:37:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>AMF &#8211; Errata and other ramblings</title>
		<link>http://web.2point1.com/2008/09/13/amf-errata-and-other-ramblings/</link>
		<comments>http://web.2point1.com/2008/09/13/amf-errata-and-other-ramblings/#comments</comments>
		<pubDate>Sat, 13 Sep 2008 15:18:42 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Action Message Format]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://web.2point1.com/2008/09/13/amf-errata-and-other-ramblings/</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of research into the AMF protocol recently. I&#8217;ve had the pleasure of reading the AMF0, and AMF3 standards cover-to-cover several times, with a view to understanding them well enough to write my own debugging tools. More about those projects another time. Not only are the standards fairly brief, but they [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of research into the <a href="http://en.wikipedia.org/wiki/Action_Message_Format" target="_blank">AMF</a> protocol recently. I&#8217;ve had the pleasure of reading the <a href="http://download.macromedia.com/pub/labs/amf/amf0_spec_121207.pdf" target="_blank">AMF0</a>, and <a href="http://download.macromedia.com/pub/labs/amf/amf3_spec_121207.pdf" target="_blank">AMF3</a> standards cover-to-cover several times, with a view to understanding them well enough to write my own debugging tools. More about those projects another time.</p>
<p>Not only are the standards fairly brief, but they contain errors. I&#8217;ve not managed to find an official errata, so here&#8217;s my starter for 10.<span id="more-64"></span></p>
<h4>1.3.1 Variable Length Unsigned 29-bit Integer Encoding (U29)</h4>
<p>The standard states that the largest unsigned integer permitted is <code>pow(2,29)-1</code>, which would be <code>0x1FFFFFFF</code>, but then goes on to state that the range of a 4 byte value goes up to <code>0x3FFFFFFF</code>. This looks like a typo, unless I am missing something critical!</p>
<p>The AMF standard is supposed to be platform independent [ish], so it doesn&#8217;t talk about Flash [much]; but it&#8217;s worth noting that the Flash Player uses <em>U29</em> for serializing <strong><em>signed</em> </strong>integers, making its useful range <code>-0x10000000 -&gt; 0x0FFFFFFF. </code>Flash serializes all integers outside this range as a <em>double</em>s, even when the AS type is <code>uint</code>; because the AMF protocol does not support an unsigned data type.</p>
<p>I find this data type a bit pointless. It is designed cut down on redundancy, but surely this could be achieved with different integer markers, 8-bit, 16-bit, etc.. The range of the integer wouldn&#8217;t have to be restricted and it would probably deserialize faster too.</p>
<h4>1.3.2 Strings and UTF-8</h4>
<p>There appears to be a typo in the third paragraph which contradicts the grammar notation below. It states that a zero flag indicates a string literal, although it says below that a zero value indicates a reference. The latter seems correct and is the same convention used in other parts of the standard.</p>
<p>More to come &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://web.2point1.com/2008/09/13/amf-errata-and-other-ramblings/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
