zdeflate.cpp File Reference

(r1785/r1282)

#include "camtypes.h"
#include "zdeflate.h"
#include "zstream.h"

Go to the source code of this file.

Classes

struct  config_s
struct  static_tree_desc_s

Defines

#define new   CAM_DEBUG_NEW
#define NIL   0
#define TOO_FAR   4096
#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)
#define EQUAL   0
#define UPDATE_HASH(s, h, c)   (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
#define INSERT_STRING(s, str, match_head)
#define CLEAR_HASH(s)
#define check_match(s, start, match, length)
 Check that the match at match_start is indeed a match.
#define FLUSH_BLOCK_ONLY(s, eof)
 Flush the current block, with given end-of-file flag. IN assertion: strstart is set to the end of the current match.
#define FLUSH_BLOCK(s, eof)

Typedefs

typedef config_s config

Enumerations

enum  compress_func { Z_deflate_stored, Z_deflate_fast, Z_deflate_slow }

Functions

 DECLARE_SOURCE ("$Revision: 1282 $")

Variables

config configuration_table [10]


Define Documentation

#define check_match s,
start,
match,
length   ) 
 

Check that the match at match_start is indeed a match.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/05/95

Definition at line 1294 of file zdeflate.cpp.

#define CLEAR_HASH  ) 
 

Value:

s->head[s->hash_size-1] = NIL; \
    zmemzero((charf *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head));

Definition at line 159 of file zdeflate.cpp.

#define EQUAL   0
 

Definition at line 128 of file zdeflate.cpp.

#define FLUSH_BLOCK s,
eof   ) 
 

Value:

{ \
   FLUSH_BLOCK_ONLY(s, eof); \
   if (s->strm->avail_out == 0) return 1; \
}

Definition at line 1425 of file zdeflate.cpp.

#define FLUSH_BLOCK_ONLY s,
eof   ) 
 

Value:

{ \
   _tr_flush_block(s, (s->block_start >= 0L ? \
                   (charf *)&s->window[(unsigned)s->block_start] : \
                   (charf *)Z_NULL), \
        (ulg)((INT32)s->strstart - s->block_start), \
        (eof)); \
   s->block_start = s->strstart; \
   flush_pending(s->strm); \
   Tracev((stderr,"[FLUSH]")); \
}
Flush the current block, with given end-of-file flag. IN assertion: strstart is set to the end of the current match.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
24/05/95

Definition at line 1413 of file zdeflate.cpp.

#define INSERT_STRING s,
str,
match_head   ) 
 

Value:

(UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \
    s->prev[(str) & s->w_mask] = match_head = s->head[s->ins_h], \
    s->head[s->ins_h] = (Pos)(str))

Definition at line 150 of file zdeflate.cpp.

#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)
 

Definition at line 86 of file zdeflate.cpp.

#define new   CAM_DEBUG_NEW
 

Definition at line 25 of file zdeflate.cpp.

#define NIL   0
 

Definition at line 78 of file zdeflate.cpp.

#define TOO_FAR   4096
 

Definition at line 82 of file zdeflate.cpp.

#define UPDATE_HASH s,
h,
 )     (h = (((h)<<s->hash_shift) ^ (c)) & s->hash_mask)
 

Definition at line 139 of file zdeflate.cpp.


Typedef Documentation

typedef struct config_s config
 


Enumeration Type Documentation

enum compress_func
 

Enumerator:
Z_deflate_stored 
Z_deflate_fast 
Z_deflate_slow 

Definition at line 98 of file zdeflate.cpp.


Function Documentation

DECLARE_SOURCE "$Revision: 1282 $"   ) 
 


Variable Documentation

config configuration_table[10]
 

Initial value:

 {
    
     {0,    0,  0,    0, Z_deflate_stored},  
     {4,    4,  8,    4, Z_deflate_fast}, 
     {4,    5, 16,    8, Z_deflate_fast},
     {4,    6, 32,   32, Z_deflate_fast},

     {4,    4, 16,   16, Z_deflate_slow},  
     {8,   16, 32,   32, Z_deflate_slow},
     {8,   16, 128, 128, Z_deflate_slow},
     {8,   32, 128, 256, Z_deflate_slow},
     {32, 128, 258, 1024, Z_deflate_slow},
     {32, 258, 258, 4096, Z_deflate_slow}}

Definition at line 109 of file zdeflate.cpp.


Generated on Sat Nov 10 03:49:24 2007 for Camelot by  doxygen 1.4.4