int compnode(HUFFNODE *node1, HUFFNODE *node2)
{
if (node1->freq < node2->freq) return 1;
- if (node1->freq > node2->freq) return -11;
+ if (node1->freq > node2->freq) return -1;
return 0;
}
/* Armo el input list y genero el arbol de huffman */
inputlist = buildlist(freqtable, &freqcount);
codetree = buildtree(inputlist,freqcount);
+ /* Armo la tabla de codigos prefijos para el encoder */
zerocodes(codetable);
buildcodes(codetable,codetree,0,0);
printcodes(codetable,freqtable);