NCBI C++ ToolKit
Classes | Macros | Functions | Variables
ct_nlmzip_inflate.cpp File Reference
#include <ncbi_pch.hpp>
#include "ct_nlmzip_i.h"
+ Include dependency graph for ct_nlmzip_inflate.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  huft
 

Macros

#define BMAX   16 /* maximum bit length of any code (16 for explode) */
 
#define N_MAX   288 /* maximum number of codes in any set */
 
#define flush_output(w)   (Nlmzip_outcnt=(w),Nlmzip_flush_window())
 
#define NEEDBITS(n)
 
#define DUMPBITS(n)
 

Functions

static int inflate_codes (struct huft *, struct huft *, int, int)
 
static int huft_build (Uint4 *, Uint4, Uint4, ush *, ush *, struct huft **, int *)
 
static int huft_free (struct huft *)
 
static int inflate_stored (void)
 
static int inflate_fixed (void)
 
static int inflate_dynamic (void)
 
static int inflate_block (int *)
 
int Nlmzip_inflate (void)
 

Variables

static Uint4 border []
 
static unsigned short cplens []
 
static ush cplext []
 
static ush cpdist []
 
static ush cpdext []
 
static ulg bb
 
static Uint4 bk
 
static unsigned short mask_bits []
 
static int lbits = 9
 
static int dbits = 6
 
static Uint4 hufts
 

Macro Definition Documentation

◆ BMAX

#define BMAX   16 /* maximum bit length of any code (16 for explode) */

Definition at line 112 of file ct_nlmzip_inflate.cpp.

◆ DUMPBITS

#define DUMPBITS (   n)
Value:
{ \
b >>= (n); \
k -= (n); \
}
yy_size_t n

Definition at line 238 of file ct_nlmzip_inflate.cpp.

◆ flush_output

#define flush_output (   w)    (Nlmzip_outcnt=(w),Nlmzip_flush_window())

Definition at line 123 of file ct_nlmzip_inflate.cpp.

◆ N_MAX

#define N_MAX   288 /* maximum number of codes in any set */

Definition at line 113 of file ct_nlmzip_inflate.cpp.

◆ NEEDBITS

#define NEEDBITS (   n)
Value:
{ \
while ( k < (n) ) { \
b |= ((ulg)Nlmzip_ReadByte()) << k; \
k+=8; \
} \
}
unsigned char Nlmzip_ReadByte(void)
unsigned long ulg
Definition: zutil.h:43

Definition at line 232 of file ct_nlmzip_inflate.cpp.

Function Documentation

◆ huft_build()

static int huft_build ( Uint4 b,
Uint4  n,
Uint4  s,
ush d,
ush e,
struct huft **  t,
int m 
)
static

Definition at line 294 of file ct_nlmzip_inflate.cpp.

References a, b, BMAX, huft::e, f(), g(), huft_free(), hufts, i, malloc(), n, N_MAX, NULL, r(), t, huft::t, uch, and huft::v.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ huft_free()

static int huft_free ( struct huft t)
static

Definition at line 494 of file ct_nlmzip_inflate.cpp.

References free(), NULL, t, and huft::v.

Referenced by huft_build(), inflate_dynamic(), and inflate_fixed().

◆ inflate_block()

static int inflate_block ( int e)
static

◆ inflate_codes()

static int inflate_codes ( struct huft tl,
struct huft td,
int  bl,
int  bd 
)
static

Definition at line 518 of file ct_nlmzip_inflate.cpp.

References b, bb, bk, DUMPBITS, huft::e, flush_output, if(), mask_bits, md, n, NEEDBITS, Nlmzip_outcnt, Nlmzip_window, t, td, uch, and WSIZE.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ inflate_dynamic()

static int inflate_dynamic ( void  )
static

◆ inflate_fixed()

static int inflate_fixed ( void  )
static

Definition at line 690 of file ct_nlmzip_inflate.cpp.

References cpdext, cpdist, cplens, cplext, huft_build(), huft_free(), i, inflate_codes(), and td.

Referenced by inflate_block().

◆ inflate_stored()

static int inflate_stored ( void  )
static

Definition at line 632 of file ct_nlmzip_inflate.cpp.

References b, bb, bk, DUMPBITS, flush_output, n, NEEDBITS, Nlmzip_outcnt, Nlmzip_window, uch, URCOMPRERR, and WSIZE.

Referenced by inflate_block().

◆ Nlmzip_inflate()

int Nlmzip_inflate ( void  )

Definition at line 948 of file ct_nlmzip_inflate.cpp.

References bb, bk, huft::e, flush_output, hufts, inflate_block(), Nlmzip_outcnt, Nlmzip_ReadUndo(), and r().

Referenced by Nlmzip_Uncompress().

Variable Documentation

◆ bb

ulg bb
static

◆ bk

Uint4 bk
static

◆ border

Uint4 border[]
static

◆ cpdext

ush cpdext[]
static
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13
}

Definition at line 189 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ cpdist

ush cpdist[]
static
Initial value:
= {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577
}

Definition at line 184 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ cplens

unsigned short cplens[]
static
Initial value:
= {
3, 4, 5, 6, 7, 8, 9, 10,
11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115,
131, 163, 195, 227, 258, 0, 0
}

Definition at line 169 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ cplext

ush cplext[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4,
5, 5, 5, 5, 0, 99, 99
}

Definition at line 177 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic(), and inflate_fixed().

◆ dbits

int dbits = 6
static

Definition at line 274 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic().

◆ hufts

Uint4 hufts
static

Definition at line 277 of file ct_nlmzip_inflate.cpp.

Referenced by huft_build(), and Nlmzip_inflate().

◆ lbits

int lbits = 9
static

Definition at line 273 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_dynamic().

◆ mask_bits

unsigned short mask_bits[]
static
Initial value:
= {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
}

Definition at line 226 of file ct_nlmzip_inflate.cpp.

Referenced by inflate_codes(), and inflate_dynamic().

Modified on Sat Dec 02 09:23:21 2023 by modify_doxy.py rev. 669887