Jump to content

Truncated binary encoding

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Clausen (talk | contribs) at 01:26, 29 May 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Truncated binary encoding is an entropy encoding typically used for uniform probability distributions with a finite alphabet. It is parameterized by a maximum number n. It is slightly more general than binary encoding which is only optimal where n is a power of two.

For example, if n is 5, binary encoding allocates these codewords:

FIXME - PUT IN TABLE

0 000

1 001

2 010

3 011

4 100

UNUSED 101


UNUSED 110

UNUSED 111

Instead, truncated binary allocates:

0 00

1 01

2 10

3 110

4 111