Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
deflate.c File Reference
#include <linux/module.h>
#include <linux/zutil.h>
#include "defutil.h"

Go to the source code of this file.

Data Structures

struct  config_s
 

Macros

#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)
 
#define FLUSH_BLOCK_ONLY(s, eof)
 
#define FLUSH_BLOCK(s, eof)
 

Typedefs

typedef block_state(* compress_func )(deflate_state *s, int flush)
 
typedef struct config_s config
 

Enumerations

enum  block_state {
  NON_BLOCKING, BLOCKING, need_more, block_done,
  finish_started, finish_done
}
 

Functions

int zlib_deflateInit2 (z_streamp strm, int level, int method, int windowBits, int memLevel, int strategy)
 
int zlib_deflateReset (z_streamp strm)
 
int zlib_deflate (z_streamp strm, int flush)
 
int zlib_deflateEnd (z_streamp strm)
 
int zlib_deflate_workspacesize (int windowBits, int memLevel)
 

Macro Definition Documentation

#define check_match (   s,
  start,
  match,
  length 
)

Definition at line 863 of file deflate.c.

#define CLEAR_HASH (   s)
Value:
s->head[s->hash_size-1] = NIL; \
memset((char *)s->head, 0, (unsigned)(s->hash_size-1)*sizeof(*s->head));

Definition at line 162 of file deflate.c.

#define EQUAL   0

Definition at line 133 of file deflate.c.

#define FLUSH_BLOCK (   s,
  eof 
)
Value:
{ \
FLUSH_BLOCK_ONLY(s, eof); \
if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
}

Definition at line 982 of file deflate.c.

#define FLUSH_BLOCK_ONLY (   s,
  eof 
)
Value:
{ \
zlib_tr_flush_block(s, (s->block_start >= 0L ? \
(char *)&s->window[(unsigned)s->block_start] : \
NULL), \
(ulg)((long)s->strstart - s->block_start), \
(eof)); \
s->block_start = s->strstart; \
flush_pending(s->strm); \
Tracev((stderr,"[FLUSH]")); \
}

Definition at line 970 of file deflate.c.

#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 153 of file deflate.c.

#define MIN_LOOKAHEAD   (MAX_MATCH+MIN_MATCH+1)

Definition at line 96 of file deflate.c.

#define NIL   0

Definition at line 88 of file deflate.c.

#define TOO_FAR   4096

Definition at line 92 of file deflate.c.

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

Definition at line 142 of file deflate.c.

Typedef Documentation

typedef block_state(* compress_func)(deflate_state *s, int flush)

Definition at line 66 of file deflate.c.

Enumeration Type Documentation

Enumerator:
NON_BLOCKING 
BLOCKING 
need_more 
block_done 
finish_started 
finish_done 

Definition at line 59 of file deflate.c.

Function Documentation

int zlib_deflate ( z_streamp  strm,
int  flush 
)

Definition at line 412 of file deflate.c.

int zlib_deflate_workspacesize ( int  windowBits,
int  memLevel 
)

Definition at line 1266 of file deflate.c.

int zlib_deflateEnd ( z_streamp  strm)

Definition at line 550 of file deflate.c.

int zlib_deflateInit2 ( z_streamp  strm,
int  level,
int  method,
int  windowBits,
int  memLevel,
int  strategy 
)

Definition at line 167 of file deflate.c.

int zlib_deflateReset ( z_streamp  strm)

Definition at line 299 of file deflate.c.