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

📄 lzw.h

📁 基于LWIP的服务器
💻 H
字号:
#define INIT_BITS 9
#define MAX_BITS  13         /* Do not exceed 14 with this program */
#define HASHING_SHIFT MAX_BITS - 8

//#if MAX_BITS == 14            /* Set the table size. Must be a prime    */
//#define TABLE_SIZE 18041      /* number somewhat larger than 2^MAX_BITS.*/
//#elif MAX_BITS == 13
#define TABLE_SIZE 9029
//#else
//#define TABLE_SIZE 2021  //5021
//#endif

#define CLEAR_TABLE 256    /* Code to flush the string table */
#define TERMINATOR  257    /* To mark EOF Condition, instead of MAX_VALUE */
#define FIRST_CODE  258    /* First available code for code_value table */
#define CHECK_TIME  100    /* Check comp ratio every CHECK_TIME chars input */

#define MAXVAL(n) (( 1 <<( n )) -1)   /* max_value formula macro */

unsigned input_code();
void *malloc();



void compress(FILE *input, FILE *output);
unsigned int find_match(int hash_prefix, unsigned int hash_character);
void expand(FILE *input, FILE *output);
unsigned char *decode_string(unsigned char *buffer, unsigned int code);
unsigned input_code(FILE *input);
void output_code(FILE *output, unsigned int code);
int MakeLzwFile(const char *file);

⌨️ 快捷键说明

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