⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 facetxt.c

📁 使用tc2的adaptive huffman编码
💻 C
字号:

#include <conio.h>
#include <stdio.h>
#include "Filedivi.c"

char str1[128],str2[128],ch;
FILE *fp1,*fp2;
int i,j;

void main()
{
    status1 s1;
    

    /*clrscr();*/
    
    printf("WELCOME TO USE DCCE 1.0  TEXT MODE,ESPCIALLY FOR DECODING\n1-For Decode,2-For Encode\n\n");
    ch=getch();
    if(ch=='1')
    {

    printf("Please input the compressed file path:\n");
    gets(str1);
    printf("\nPlease input the uncompressed file path:\n");
    gets(str2);

    strcpy(s1.pchinput,str1);
    strcpy(s1.pchoutput,str2);
    if((fp1=fopen(str1,"rb"))==0)
        printf("Open Error!");
    else

        if((fp2=fopen(str2,"wb"))==0)
            printf("Open Error!");
        else
        {
            printf("\nDecoding...Please wait patiently\n\n");
            Decoder(fp1,fp2);
        }  
    printf("Finished!Any key to quit");
    getch();
    }
    if(ch=='2')
    {

    printf("Please input the uncompressed file path:\n");
    gets(str1);
    printf("\nPlease input the compressed file path:\n");
    gets(str2);

    strcpy(s1.pchinput,str1);
    strcpy(s1.pchoutput,str2);
    if((fp1=fopen(str1,"rb"))==0)
        printf("Open Error!");
    else

        if((fp2=fopen(str2,"wb"))==0)
            printf("Open Error!");
        else
        {
            printf("\nEncoding...Please wait patiently\n\n");
            Encoder(fp1,fp2,&s1);
        }  
    printf("Finished!Any key to quit");
    getch();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -