<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.opendap.org/index.php?action=history&amp;feed=atom&amp;title=Length_Bytes</id>
	<title>Length Bytes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.opendap.org/index.php?action=history&amp;feed=atom&amp;title=Length_Bytes"/>
	<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Length_Bytes&amp;action=history"/>
	<updated>2026-06-18T04:54:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Length_Bytes&amp;diff=2236&amp;oldid=prev</id>
		<title>Jimg: New page: The current spec (revision 1.17) contains a note about specifying lengths using a scheme that does not limit the length to one integer. The scheme is proposed for the &lt;nop&gt;BitImage type, b...</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Length_Bytes&amp;diff=2236&amp;oldid=prev"/>
		<updated>2008-06-24T21:28:32Z</updated>

		<summary type="html">&lt;p&gt;New page: The current spec (revision 1.17) contains a note about specifying lengths using a scheme that does not limit the length to one integer. The scheme is proposed for the &amp;lt;nop&amp;gt;BitImage type, b...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The current spec (revision 1.17) contains a note about specifying lengths using a scheme that does not limit the length to one integer. The scheme is proposed for the &amp;lt;nop&amp;gt;BitImage type, but I wonder if it should be used anywhere we specify a length? The scheme is as follows: the high-order bit is used to indicate whether another length byte follows and the remaining 7 bits are length value. For example, a length of 500 would be 1000 0011 0111 0100 (0x83 0x74). The set high-order bit of the first byte indicates a second byte follows. The cleared high-order bit of the second byte indicates it&amp;#039;s the last byte.&lt;br /&gt;
&lt;br /&gt;
James Gallagher - 15 Sep 2003&lt;br /&gt;
&lt;br /&gt;
Take a look at the [http://www.cl.cam.ac.uk/~mgk25/unicode.html UTF-8] FAQ. UTF-8 uses an encoding scheme that is robust. It is easy to spot missing bytes, for example. OTOH, the scheme Tom has suggested has the advantage that it&amp;#039;ll be easy to code and will never use more than N+1 bytes for somethng that would fit in N bytes as an unsigned integer.&lt;br /&gt;
&lt;br /&gt;
I think we should adopt this unless there&amp;#039;s another widely-used scheme that accomplishes the same goal.&lt;br /&gt;
&lt;br /&gt;
James Gallagher - 26 Sep 2003&lt;/div&gt;</summary>
		<author><name>Jimg</name></author>
	</entry>
</feed>