Lhaz
読み取り中…
検索中…
一致する文字列を見つけられません
マクロ定義 | 関数 | 変数
huf.cpp ファイル
#include <stdlib.h>
#include "chuf.h"
#include "lhazerr.h"
#include "lhazif.h"

マクロ定義

#define NPT   0x80
 
#define NP   (MAX_DICBIT + 1)
 
#define USHRT_BIT   16 /* (CHAR_BIT * sizeof(ushort)) */
 
#define NT   (USHRT_BIT + 3)
 
#define PBIT   5 /* smallest integer such that (1 << PBIT) > * NP */
 
#define TBIT   5 /* smallest integer such that (1 << TBIT) > * NT */
 

関数

void init_putbits ()
 
void make_table (short, uchar[], short, ushort[], int)
 
short make_tree (int, ushort[], uchar[], ushort[])
 
unsigned char * alloc_buf (void)
 
void free_buf (void)
 

変数

ushort bitbuf
 
ushort left [2 *NC - 1]
 
ushort right [2 *NC - 1]
 
uchar c_len [NC]
 
uchar pt_len [NPT]
 
ushort c_freq [2 *NC - 1]
 
ushort c_table [4096]
 
ushort c_code [NC]
 
ushort p_freq [2 *NP - 1]
 
ushort pt_table [256]
 
ushort pt_code [NPT]
 
ushort t_freq [2 *NT - 1]
 

マクロ定義詳解

◆ NP

#define NP   (MAX_DICBIT + 1)

◆ NPT

#define NPT   0x80

◆ NT

#define NT   (USHRT_BIT + 3)

◆ PBIT

#define PBIT   5 /* smallest integer such that (1 << PBIT) > * NP */

◆ TBIT

#define TBIT   5 /* smallest integer such that (1 << TBIT) > * NT */

◆ USHRT_BIT

#define USHRT_BIT   16 /* (CHAR_BIT * sizeof(ushort)) */

関数詳解

◆ alloc_buf()

unsigned char * alloc_buf ( void  )

◆ free_buf()

void free_buf ( void  )

◆ init_putbits()

void init_putbits ( )
extern

◆ make_table()

void make_table ( short  nchar,
uchar  bitlen[],
short  tablebits,
ushort  table[],
int  cnt 
)
extern

◆ make_tree()

short make_tree ( int  nparm,
ushort  freqparm[],
uchar  lenparm[],
ushort  codeparm[] 
)
extern

変数詳解

◆ bitbuf

ushort bitbuf
extern

◆ c_code

ushort c_code[NC]

◆ c_freq

ushort c_freq[2 *NC - 1]

◆ c_len

uchar c_len[NC]

◆ c_table

ushort c_table[4096]

◆ left

ushort left[2 *NC - 1]

◆ p_freq

ushort p_freq[2 *NP - 1]

◆ pt_code

ushort pt_code[NPT]

◆ pt_len

uchar pt_len[NPT]

◆ pt_table

ushort pt_table[256]

◆ right

ushort right[2 *NC - 1]

◆ t_freq

ushort t_freq[2 *NT - 1]