Re: Succint prefix-free code for integers?
- From: Nicolas <_nico_._bobo_@xxxxxxxxxxxxxx>
- Date: Thu, 21 Feb 2008 00:07:23 +0100
Nyang A. Phra a écrit :
What I want to do is map integers from 0 ... inf to a prefix-free
code.
Now that's easy. Say I map
0 0
1 10
2 110
3 1110
4 11110
...
But that's not too handy for big numbers. I might try
0 0
1 100
2 101
3 11000
4 11001
5 11010
6 11011
...
Or something else. But what would be the most compact code? I'm
thinking that the prefix-generating bintree should have as high leaf-
node-to-depth -ratio as possible, but what would that mean in the case
where the bintree has to be infinite? Confused.
You seems to be looking for universal codes :
http://en.wikipedia.org/wiki/Universal_code_%28data_compression%29
You can try the Fibonacci or the taboo codes (similar to Fibonacci code, but with a parameter allowing it to better fit your need).
Steven Pigeon, who is active in this group (and invented the taboo codes), may be able to say you more about universal coding.
Nicolas
.
- Follow-Ups:
- Re: Succint prefix-free code for integers?
- From: Nyang A. Phra
- Re: Succint prefix-free code for integers?
- References:
- Succint prefix-free code for integers?
- From: Nyang A. Phra
- Succint prefix-free code for integers?
- Prev by Date: Re: Succint prefix-free code for integers?
- Next by Date: Re: Succint prefix-free code for integers?
- Previous by thread: Re: Succint prefix-free code for integers?
- Next by thread: Re: Succint prefix-free code for integers?
- Index(es):