No it's not for homework but for learning purposes...
Bengt wrote:
I think I prefer little-endian bit streams though,
good point: should lead to easier decoding via right-shifts
e.g. (just hacked, not tested beyond
what you see
Yep, yours looks better. Pretty soon there isn't going to be much learning left in this for Andrea ;-)
and not recommended as efficient either way, esp the decode,
I expect that decoding by walking the coding tree is cleaner (not sure about faster).
but it might
be illustrative of something for Andrea ;-)
Michael
-- http://mail.python.org/mailman/listinfo/python-list