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

📄 comninit.c

📁 windows gzip source code
💻 C
字号:
//
// comninit.c
//
// Initialisation code common to inflate and deflate
//
#include <stdio.h>
#include <crtdbg.h>
#include "inflate.h"
#include "deflate.h"


// Called by InitCompression() and InitDecompression() (functions to init global DLL data)
//
// Initialises the tree lengths of static type blocks
//
void InitStaticBlock(void)
{
    int i;

    // No real thread synchronisation problems with doing this
    if (g_InitialisedStaticBlock == FALSE)
    {
        g_InitialisedStaticBlock = TRUE;

        for (i = 0; i <= 143; i++)
        	g_StaticLiteralTreeLength[i] = 8;

        for (i = 144; i <= 255; i++)
	        g_StaticLiteralTreeLength[i] = 9;

        for (i = 256; i <= 279; i++)
	        g_StaticLiteralTreeLength[i] = 7;

        for (i = 280; i <= 287; i++)
	        g_StaticLiteralTreeLength[i] = 8;
    }
}

⌨️ 快捷键说明

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