LZW.H
上传用户:bjghjy
上传日期:2007-01-07
资源大小:379k
文件大小:1k
- #include <stdio.h>
- typedef struct tag_bit_file
- {
- FILE *file;
- unsigned char mask;
- int rack;
- int pacifier_counter;
- char *buffer;
- unsigned int ptr;
- }BIT_FILE;
- extern BIT_FILE *OpenInputBitFile(char *filename);
- extern BIT_FILE *OpenOutputBitFile(char *filename);
- extern void OutputBit(BIT_FILE *bit_file,int bit);
- extern void OutputBits(BIT_FILE *bit_file,unsigned long code,int count);
- extern int InputBit(BIT_FILE *bit_file);
- extern unsigned long InputBits(BIT_FILE *bit_file,int count);
- extern void CloseInputBitFile(BIT_FILE *bit_file);
- extern void CloseOutputBitFile(BIT_FILE *bit_file);
- extern void FilePrintBinary(FILE *file,unsigned int code,int bits);
- extern void fatal_error(char *fmt);
- //void CompressFile(FILE *input,BIT_FILE *output);
- //void ExpandFile(BIT_FILE *input,FILE *output);
- void CompressFile(char *input,char *output);
- void CompressMemFile(char *ptr,long len,char *output);
- void ExpandFile(char *input,char *output);