X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/69bddb46f46871d27bcf797cd6fae14430802380..ade05bc64de4853d99cdc1ea2657845728614f03:/src/statichuff/statichuff.h diff --git a/src/statichuff/statichuff.h b/src/statichuff/statichuff.h index 8c3502d..08da37e 100644 --- a/src/statichuff/statichuff.h +++ b/src/statichuff/statichuff.h @@ -19,7 +19,22 @@ typedef struct t_code { unsigned char codelength; } SHUFFCODE; -int shuff_decode_file(char *inputfile, char *outputfile); -int shuff_encode_file(char *inputfile, char *outputfile); +typedef struct t_huff { + FILE *tmpfp; /* filepointer al temporal para un shuff_bychunk */ + char *sourcefile; /* Nombre del archivo a comprimir */ + char *targetfile; /* Nombre del archivo comprimido */ + t_freq *freqtable; /* Tabla de frecuencias */ + t_freq sumfreq; /* Frecuencia total acumulada */ + long volsize; /* Tamanio de volumen para multivol */ + char preloadfreq; /* 1 freqtable preloaded (bychunk|canonico) - 0 byfile */ + +} HUFF_STATE; + +HUFF_STATE *shuff_init_static_byfile(char *inputfile, char *outputfile, long volsize); +HUFF_STATE *shuff_init_static_bychunk(char *outputfile, long volsize); +void shuff_deinit_static_byfile(HUFF_STATE *fshuff); +void shuff_deinit_static_bychunk(HUFF_STATE *cshuff); +int shuff_decode_file(HUFF_STATE *shuff); +int shuff_encode_file(HUFF_STATE *shuff); #endif /* _STATICHUFF_H_ */