: I added some source code which I think is pretty simple. It's a little weird using base 10 but I did that to align with the numerical example worked through in the article, and the source code produce the same results as the example.--[[Special:Contributions/98.247.148.214|98.247.148.214]] ([[User talk:98.247.148.214|talk]]) 06:58, 21 April 2009 (UTC)
== Example illustration ==
Is there a better example than the one given in Range encoding.jpg? In the example, we must transmit 2 values (25056 and 25920) taken from the range 0...100000; it takes 17 bits uniquely express values in that range, so transmitting the 2 values requires 34 bits. In comparison, each of the symbols in the original string require 2 bits (because we have 3 values, A, B, <EOM>) so transmitting AABA<EOM> would require 10 bits, MUCH less than the 34 bits required for the range-encoded values. I must be missing something here. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/216.16.247.154|216.16.247.154]] ([[User talk:216.16.247.154|talk]]) 14:45, 19 November 2010 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->