Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Elias omega coding
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Universal code encoding positive integers}} {{Use dmy dates|date=May 2019|cs1-dates=y}} '''Elias Ο coding''' or '''Elias omega coding''' is a [[universal code (data compression)|universal code]] encoding the positive integers developed by [[Peter Elias]]. Like [[Elias gamma coding]] and [[Elias delta coding]], it works by prefixing the positive integer with a representation of its [[order of magnitude]] in a universal code. Unlike those other two codes, however, Elias omega recursively encodes that prefix; thus, they are sometimes known as '''recursive Elias codes'''. Omega coding is used in applications where the largest encoded value is not known ahead of time, or to [[Data compression|compress]] data in which small values are much more frequent than large values. To encode a [[positive integer]] ''N'': #Place a "0" at the end of the code. #If ''N'' = 1, stop; encoding is complete. #Prepend the [[binary numeral system|binary]] representation of ''N'' to the beginning of the code. This will be at least two bits, the first bit of which is a 1. #Let ''N'' equal the number of bits just prepended, minus one. #Return to Step 2 to prepend the encoding of the new ''N''. To decode an Elias omega-encoded positive integer: #Start with a variable ''N'', set to a value of 1. #If the next bit is a "0" then stop. The decoded number is ''N''. #If the next bit is a "1" then read it plus ''N'' more bits, and use that binary number as the new value of ''N''. Go back to Step 2.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)