RE: [stella] Reflex: Online level editor

Subject: RE: [stella] Reflex: Online level editor
From: "Lee Fastenau" <stella@xxxxxxxxxxxxxxx>
Date: Thu, 16 Sep 2004 07:57:30 -0500
> Lee wrote:
> > The following page builds a visual huffman tree, illustrating
> how frequent
> > characters are represented by fewer bits than infrequent ones.
> It also has
> > a couple of links to really descriptive articles about huffman encoding.
> > http://www.ioyu.com/io/javascript/huffman.asp
>
> Thanks for the links!
>
> BTW: Did you already find the time to verify my decoding suggestions?
>
> Have fun!
> Thomas

No, but I've thought about it a lot.  Since each uncompressed byte of level
data only uses 5 bits, that would mean up to 32 data nodes in the huffman
tree to represent all the bit patterns, plus 1 extra node to represent the
end of a level.  Since there are n-1 branches, my huffman tree could get as
large as (and would likely take) 65 bytes.  Then I have the bit pattern
lookup table which is another 16 bytes long, bringing the overhead to 81
bytes.  My decompression routine, not including the mirroring function,
takes another 156 bytes.  Basically, the compressed level data would require
237 bytes of decompression overhead, which just _feels_ like too much.

I guess my point is... I'm having second thoughts about straight huffman
compression.  I may need your help soon, Thomas. :)

-Lee



Current Thread