Content deleted Content added
m Frap moved page Even-Rodeh coding to Even–Rodeh coding |
Use var template |
||
Line 1:
'''
== Encoding ==
To code a [[non-negative integer]]
# If
# If
# Prepend the coded value with the [[binary numeral system|binary]] representation of
# Store the number of bits prepended in step 3 as the new value of
# Go back to step 2.
To decode an
# Read 3 bits and store the value into
#* If the first bit read was <code>0</code> then stop. The decoded number is
#* If the first bit read was <code>1</code> then continue to step 2.
# Examine the next bit.
#* If the bit is <code>0</code> then read 1 bit and stop. The decoded number is
#* If the bit is <code>1</code> then read
== Examples ==
|