more useful options | |
PerlMonks |
Re: Huffman coding in pure Perlby Anno (Deacon) |
on Mar 04, 2007 at 19:20 UTC ( [id://603124]=note: print w/replies, xml ) | Need Help?? |
The main inefficiency is that bit operations are not really bit
operations; rather, the module uses ASCII strings of 0s and 1s,
and only packs it into a real bit string after the encoded string
has been constructed. ...
On the encoding side, it is only slightly harder to build the bit vector directly, using vec() instead of pack 'b'.
The decoding side is harder. Update: No, it isn't. Dehuff is as easily adapted to vec().
Anno
In Section
Code Catacombs
|
|