X-Git-Url: https://git.llucax.com/z.facultad/75.06/jacu.git/blobdiff_plain/22942d33dcdd7cc185b9ad198fc1c35159f154ea..2e29fc7e9a20173cb2e58bb93a72bca5e57a912d:/src/statichuff/statichuff.h diff --git a/src/statichuff/statichuff.h b/src/statichuff/statichuff.h index 2ae1a60..97e8f4c 100644 --- a/src/statichuff/statichuff.h +++ b/src/statichuff/statichuff.h @@ -27,7 +27,7 @@ typedef struct t_huff { char *targetfile; /* Nombre del archivo comprimido */ long volsize; /* Tamanio de volumen para multivol */ char bychunk; /* 0 works byfile, 1 works bychunk */ - char preloadfreq; /* 1 Freqtable has been preloaded (bychunk | canonic) */ + char canonic; /* 1 Huffman Canonico con preloaded freqtable */ t_freq *freqtable; /* Tabla de frecuencias */ t_freq sumfreq; /* Frecuencia total acumulada */ SHUFFNODE *codetree; /* Puntero al arbol de codigos prefijos */ @@ -44,5 +44,9 @@ void shuff_deinit_encoder(HUFF_STATE *shuff); void shuff_deinit_decoder(HUFF_STATE *shuff); int shuff_encode_file(HUFF_STATE *shuff); int shuff_decode_file(HUFF_STATE *shuff); +int shuff_scanfreq_chunk(HUFF_STATE *chunkshuff, char* chunk, int chunksize); +int shuff_decode_chunk(HUFF_STATE *shuff, char *chunk, int chunksize, int *decodedbytes); +int shuff_savemodel(HUFF_STATE *shuff); +int shuff_loadmodel(HUFF_STATE *shuff, char *modelfile); #endif /* _STATICHUFF_H_ */