8 typedef unsigned long int t_freq;
10 typedef struct t_freqnode {
11 unsigned short int symbol;
13 struct t_freqnode *lchild;
14 struct t_freqnode *rchild;
17 typedef struct t_code {
18 unsigned long int code;
19 unsigned char codelength;
22 typedef struct t_huff {
23 FILE *tmpfp; /* filepointer al temporal para un shuff_bychunk */
24 char *sourcefile; /* Nombre del archivo a comprimir */
25 char *targetfile; /* Nombre del archivo comprimido */
26 t_freq *freqtable; /* Tabla de frecuencias */
27 t_freq sumfreq; /* Frecuencia total acumulada */
28 long volsize; /* Tamanio de volumen para multivol */
29 char preloadfreq; /* 1 freqtable preloaded (bychunk|canonico) - 0 byfile */
33 HUFF_STATE *shuff_init_static_byfile(char *inputfile, char *outputfile, long volsize);
34 HUFF_STATE *shuff_init_static_bychunk(char *outputfile, long volsize);
35 void shuff_deinit_static_byfile(HUFF_STATE *fshuff);
36 void shuff_deinit_static_bychunk(HUFF_STATE *cshuff);
37 int shuff_decode_file(HUFF_STATE *shuff);
38 int shuff_encode_file(HUFF_STATE *shuff);
40 #endif /* _STATICHUFF_H_ */