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

Re: [colorforth] Unused character encodings available in Colorforth


I coded some of this, one thing that becomes obvious is that the tag needs
to precede the word.

Also it seems you need to format the numbers and variables specially. So
perhaps a word is encoded in these forms:

tag word end-of-word
tag number (tag = 2,5,6,8)
tag word end-of-word number (tag = 12)

In this case number is a fixed 32 bits.

Is this what you had in mind?

On Tue, 24 Feb 2004, Chuck Moore wrote:

> The 0 0000 character code indicates end-of-word. With characters packed into
> 32-bit words, zeros are also used as fill if 28 bits aren't used.
>
> But I had in mind to parse/unparse words as they move from/to disk or
> Internet. That is, the parsed 32-bit words are converted to a bit stream.
> Then the only zeros would be the end-of-word code. It is then the most
> frequently used code and deserves a 5-bit length.
>
> I've never gotten around to doing this, but guess maybe a 50% compression
> results. Anyone want to try it?
>
> After the end-of-word, I'd append the 4-bit tag. These could be
> length-encoded, but it doesn't seem worth the effort.
>
> I'd also use an empty word (an extra 0 0000) to indicate end-of-block or
> end-of-text.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: colorforth-unsubscribe@xxxxxxxxxxxxxxxxxx
> For additional commands, e-mail: colorforth-help@xxxxxxxxxxxxxxxxxx
> Main web page - http://www.colorforth.com
>
>

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