Anonymous user
Huffman coding: Difference between revisions
m
→Alternative
(Added BBC BASIC) |
m (→Alternative) |
||
Line 756:
}
void init(const char *s)
{
int i, freq[128] = {0};
Line 772:
}
void encode(const char *s, char *out)
{
while (*s) {
Line 780:
}
void decode(const char *s, node t)
{
node n = t;
Line 797:
{
int i;
const char *str = "this is an example for huffman encoding", buf[1024];
init(str);
|