Re: creating very small types

2005-04-28 Thread Bengt Richter
On Thu, 28 Apr 2005 05:07:34 GMT, [EMAIL PROTECTED] (Bengt Richter) wrote: ... some not quite correct code ;-/ (I copy/pasted and created an illusion. My code dict has no EOS, so I decode pad zero bits as code that a single zero stands for ('a' in this case) so that was an oversight. I should

creating very small types

2005-04-27 Thread andrea
I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them much... Thank you very much Any good link would be

Re: creating very small types

2005-04-27 Thread Jeremy Bowers
On Wed, 27 Apr 2005 22:17:07 +0200, andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them

Re: creating very small types

2005-04-27 Thread andrea
Jeremy Bowers wrote: On Wed, 27 Apr 2005 22:17:07 +0200, andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't

Re: creating very small types

2005-04-27 Thread Michael Spencer
andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them much... ... I understand I can't do it easily

Re: creating very small types

2005-04-27 Thread Dan Bishop
Michael Spencer wrote: andrea wrote: I was thinking to code the huffman algorithm and trying to compress something with it, but I've got a problem. How can I represent for example a char with only 3 bits?? I had a look to the compression modules but I can't understand them much... ... I

Re: creating very small types

2005-04-27 Thread Michael Spencer
andrea wrote: 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