📄 compress.h
字号:
//#include <dos.h>
#include <stdio.h>
#include <malloc.h>
//#include <iostream>
#include <tchar.h>
#include <stdlib.h>
//#include <conio.h>
typedef unsigned short word;//确定为两个字节
typedef unsigned char chch;//确定为一个字节
// compress.cpp : 定义控制台应用程序的入口点。
// 为什么用malloc时 内存会互相重叠? 最大能开多少?
// 第一次seek的match的结果可能会比实际小一
static long double a_file=0; //计算总文件长度
static long double af_file=0; //计算压完后总文件长度
static long double len_af=0; //计算一个文件的af_length
static long double len_cp=0; //计算一个文件的cp_length
static long double len_fi=0; //计算一个文件的长度
static long double result=0; //压完后和压前之比
static double al_se=0;//总的分成块数
static double no_se=0;//现在完成的块数
static double len_se=0;//每块的长度
static double len_db=0;//达标数
static double pe_num=0;//主要计算64k中完成了几段
//void reuse(void);
word hashfun(char *windows);
int scrollwindows(word i,char *windows, char *content,word last);
char seek(char *windows,word *address,char *content,word i,word *hash,word *hashtable,word flag,word c_flag);
char seek_phrase(char *windows,word flag ,word *c_flag,word *address,word i,char *content,word *hash,word *hashtable,word last,int type);
void out_code2(char match,word *af_length,word *cp_length,word address,char *windows,char *neirong,char *len_date);
void file_out_code2(FILE *out,word af_length,word cp_length,char *neirong,word last,char *len_date);
int compress(FILE *in,FILE *out,int type);
int decompress(FILE *in,int type);
//void ymain(int argc, char* argv1[]);
int umain(char* path);
int comain(char name[100][50],char allpath[100][100],int itemCount,char* savePath);
int comain2(char name[100][50],char allpath[100][100],int itemCount,char* savePath);
int CPList(char target[50],char name[100][50],long length[100]);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -