📄 txttime.c
字号:
#include <conio.h>
#include <stdio.h>
#include <time.h>
#include "Filedivi.c"
char str1[128],str2[128],ch;
FILE *fp1,*fp2;
int i,j;
void main()
{
status1 s1;
clock_t start, finish;
/*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");
start = clock(); /* Gets system time*/
Decoder(fp1,fp2);
finish = clock(); /* Gets system time again*/
}
printf("\n\nFinished!\nThe methom takes time:%f\n\nAny key to quit",(double)(finish - start) / CLOCKS_PER_SEC);
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");
start = clock(); /* Gets system time*/
Encoder(fp1,fp2,&s1);
finish = clock(); /* Gets system time again*/
}
printf("\n\nFinished!\nThe methom takes time:%f\n\nAny key to quit",(double)(finish - start) / CLOCKS_PER_SEC);
getch();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -