[Tremor] _make_words functionality

Segher Boessenkool segher at kernel.crashing.org
Thu Oct 13 03:29:21 PDT 2005


> Can somebody explain me the _make_words function in
> Tremor.
>
> Say: for the example given in spec, i.e. for a length
> list of 2,4,4,4,4,2,3,3 what will be the values for
> work array and how they are computed?
>
> _make_words(lengthlist,s->entries,work
> ,quantvals,s,opb,maptype)
>
> _make_words(lengthlist,8,work,
> 0,s,opb,0)

It uses a "first fit" algorithm, so your example would
give the codewords

00
0100
0101
0110
0111
10
110
111

in sequence.

Another example:

3,1,2,3

gives

000
1
01
001


Segher



More information about the Tremor mailing list