main.c
来自「几个压缩算法程序(改进包括lzw、lz77、compress、huffeman)」· C语言 代码 · 共 26 行
C
26 行
#include <stdio.h>
#include <string.h>
#include "chcode.c"
main()
{ unsigned char * instream;
long i,length;
FILE * fp;
fp=fopen("c:\\test.txt","r");
fseek(fp,0L,2);
length=ftell(fp);
fseek(fp,0l,0);
fclose(fp);
printf("length=%ld",length);
length=compress_code( instream,length);
length=uncode_expand( instream,length);
for( i=1;i<=length;i++ ) putc( * instream++, stdout );
free( (unsigned char *)instream);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?