home .. forth .. colorforth mail list archive ..

Re: [colorforth] shifted huffman trees


--- Mark Slicker <maslicke@xxxxxxxxxxx> wrote:

> > For example, the tag bits of a word could become:
> >
> >   111 extension
> >   110 variable
> >   101 comment
> >   100 define
> >   011 compile/cyan
> >   010 compile/green
> >   001 execute
> > 11000 compile hex #
> > 10000 execute hex #
> > 01000 compile decimal #
> > 00000 execute decimal #
>   ||
>        ||
> 
>     ==>
> 
> You need to append the left two bits of the last
> four bit strings to the right of the string for this
> to be a valid prefix coding.

My illustration has the tags growing to left simply
because the tag field is currently in the LSBs of the
32 bit number.  That seems convenient to implement so
I saw no reason to change.  You could certainly switch
the tag field to the MSBs and append those two bits on
the right instead if that works out better.

Bill


		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
Main web page - http://www.colorforth.com