Elias-δ sacrifices some efficiency for small numbers in order to gain efficiency
at encoding larger numbers. Notice that the code for the number 2 has increased
to 4 bits instead of the 3 bits required by the Elias-γ code. However, for numbers
larger than 16, the Elias-δ code requires no more space than the Elias-γ code, and
for numbers larger than 32, the Elias-δ requires less space.
Specifically, the Elias-γ code requires ⌊log
2
(⌊log
2
k⌋ + 1)⌋ + 1 bits for k
dd
in
unary, followed by ⌊log
2
(⌊log
2
k⌋ + 1)⌋ bits for k
dr
in binary, and ⌊log
2
k⌋ bits
for k
r
in binary. The total cost is approximately 2 log
2
log
2
k + log
2
k.