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