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

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  config
 

Macros

#define HASH_BITS   15
 
#define HASH_SIZE   (Uint4)(1<<HASH_BITS)
 
#define HASH_MASK   (HASH_SIZE-1)
 
#define WMASK   (WSIZE-1)
 
#define NIL   0 /* Tail of hash chains */
 
#define FAST   4
 
#define SLOW   2
 
#define TOO_FAR   4096
 
#define H_SHIFT   ((HASH_BITS+MIN_MATCH-1)/MIN_MATCH)
 
#define max_insert_length   max_lazy_match
 
#define EQUAL   0
 
#define UPDATE_HASH(h, c)   (h = (((h)<<H_SHIFT) ^ (c)) & HASH_MASK)
 
#define INSERT_STRING(s, match_head)
 
#define FLUSH_BLOCK(eof)
 

Typedefs

typedef unsigned short Pos
 
typedef Uint4 IPos
 
typedef struct config config
 

Functions

static void fill_window (void)
 
static ulg deflate_fast (void)
 
static int longest_match (IPos cur_match)
 
void Nlmzip_lm_init (int pack_level, ush *flags)
 
ulg Nlmzip_deflate (void)
 

Variables

static ulg window_size = (ulg)2* 0x8000
 
static Uint4 ins_h
 
static Uint4 prev_length
 
static Uint4 match_start
 
static int eofile
 
static Uint4 lookahead
 
static Uint4 max_chain_length
 
static Uint4 max_lazy_match
 
static int compr_level
 
static Uint4 good_match
 
static int nice_match
 
static config configuration_table [10]
 

Macro Definition Documentation

◆ EQUAL

#define EQUAL   0

Definition at line 109 of file ct_nlmzip_deflate.cpp.

◆ FAST

#define FAST   4

Definition at line 86 of file ct_nlmzip_deflate.cpp.

◆ FLUSH_BLOCK

#define FLUSH_BLOCK (   eof)
Value:
Uint4 Nlmzip_strstart
Int4 Nlmzip_block_start
unsigned char Nlmzip_window[2L *0x8000]
ulg Nlmzip_flush_block(char *, ulg, int)
#define NULL
Definition: ncbistd.hpp:225
int32_t Int4
4-byte (32-bit) signed integer
Definition: ncbitype.h:102
uint32_t Uint4
4-byte (32-bit) unsigned integer
Definition: ncbitype.h:103

Definition at line 135 of file ct_nlmzip_deflate.cpp.

◆ H_SHIFT

#define H_SHIFT   ((HASH_BITS+MIN_MATCH-1)/MIN_MATCH)

Definition at line 99 of file ct_nlmzip_deflate.cpp.

◆ HASH_BITS

#define HASH_BITS   15

Definition at line 66 of file ct_nlmzip_deflate.cpp.

◆ HASH_MASK

#define HASH_MASK   (HASH_SIZE-1)

Definition at line 80 of file ct_nlmzip_deflate.cpp.

◆ HASH_SIZE

#define HASH_SIZE   (Uint4)(1<<HASH_BITS)

Definition at line 79 of file ct_nlmzip_deflate.cpp.

◆ INSERT_STRING

#define INSERT_STRING (   s,
  match_head 
)
Value:
Nlmzip_prev[(s) & WMASK] = match_head = head[ins_h], \
head[ins_h] = (s))
static Uint4 ins_h
#define UPDATE_HASH(h, c)
#define WMASK
#define head
Definition: ct_nlmzip_i.h:138
#define MIN_MATCH
Definition: zutil.h:84

Definition at line 126 of file ct_nlmzip_deflate.cpp.

◆ max_insert_length

#define max_insert_length   max_lazy_match

Definition at line 106 of file ct_nlmzip_deflate.cpp.

◆ NIL

#define NIL   0 /* Tail of hash chains */

Definition at line 83 of file ct_nlmzip_deflate.cpp.

◆ SLOW

#define SLOW   2

Definition at line 87 of file ct_nlmzip_deflate.cpp.

◆ TOO_FAR

#define TOO_FAR   4096

Definition at line 92 of file ct_nlmzip_deflate.cpp.

◆ UPDATE_HASH

#define UPDATE_HASH (   h,
 
)    (h = (((h)<<H_SHIFT) ^ (c)) & HASH_MASK)

Definition at line 116 of file ct_nlmzip_deflate.cpp.

◆ WMASK

#define WMASK   (WSIZE-1)

Definition at line 81 of file ct_nlmzip_deflate.cpp.

Typedef Documentation

◆ config

typedef struct config config

◆ IPos

typedef Uint4 IPos

Definition at line 149 of file ct_nlmzip_deflate.cpp.

◆ Pos

typedef unsigned short Pos

Definition at line 148 of file ct_nlmzip_deflate.cpp.

Function Documentation

◆ deflate_fast()

static ulg deflate_fast ( void  )
static

◆ fill_window()

static void fill_window ( void  )
static

◆ longest_match()

static int longest_match ( IPos  cur_match)
static

◆ Nlmzip_deflate()

ulg Nlmzip_deflate ( void  )

◆ Nlmzip_lm_init()

void Nlmzip_lm_init ( int  pack_level,
ush flags 
)

Variable Documentation

◆ compr_level

int compr_level
static

Definition at line 191 of file ct_nlmzip_deflate.cpp.

Referenced by Nlmzip_deflate(), and Nlmzip_lm_init().

◆ configuration_table

config configuration_table[10]
static
Initial value:
= {
{0, 0, 0, 0},
{4, 4, 8, 4},
{4, 5, 16, 8},
{4, 6, 32, 32},
{4, 4, 16, 16},
{8, 16, 32, 32},
{8, 16, 128, 128},
{8, 32, 128, 256},
{32, 128, 258, 1024},
{32, 258, 258, 4096}
}

Definition at line 209 of file ct_nlmzip_deflate.cpp.

Referenced by Nlmzip_lm_init().

◆ eofile

int eofile
static

Definition at line 174 of file ct_nlmzip_deflate.cpp.

Referenced by deflate_fast(), fill_window(), Nlmzip_deflate(), and Nlmzip_lm_init().

◆ good_match

Uint4 good_match
static

Definition at line 194 of file ct_nlmzip_deflate.cpp.

Referenced by longest_match(), and Nlmzip_lm_init().

◆ ins_h

Uint4 ins_h
static

Definition at line 166 of file ct_nlmzip_deflate.cpp.

Referenced by deflate_fast(), fill_window(), and Nlmzip_lm_init().

◆ lookahead

Uint4 lookahead
static

Definition at line 175 of file ct_nlmzip_deflate.cpp.

Referenced by deflate_fast(), fill_window(), Nlmzip_deflate(), and Nlmzip_lm_init().

◆ match_start

Uint4 match_start
static

◆ max_chain_length

Uint4 max_chain_length
static

Definition at line 181 of file ct_nlmzip_deflate.cpp.

Referenced by longest_match(), and Nlmzip_lm_init().

◆ max_lazy_match

Uint4 max_lazy_match
static

Definition at line 188 of file ct_nlmzip_deflate.cpp.

Referenced by Nlmzip_deflate(), and Nlmzip_lm_init().

◆ nice_match

int nice_match
static

Definition at line 197 of file ct_nlmzip_deflate.cpp.

Referenced by longest_match(), and Nlmzip_lm_init().

◆ prev_length

Uint4 prev_length
static

Definition at line 171 of file ct_nlmzip_deflate.cpp.

Referenced by compile_regex(), deflate_fast(), longest_match(), and Nlmzip_deflate().

◆ window_size

ulg window_size = (ulg)2* 0x8000
static
Modified on Sat Dec 02 09:21:39 2023 by modify_doxy.py rev. 669887