Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
puff.c File Reference
#include <setjmp.h>
#include "puff.h"
Include dependency graph for puff.c:

Go to the source code of this file.

Classes

struct  state
 
struct  huffman
 

Macros

#define local   static /* for local function definitions */
 
#define MAXBITS   15 /* maximum bits in a code */
 
#define MAXLCODES   286 /* maximum number of literal/length codes */
 
#define MAXDCODES   30 /* maximum number of distance codes */
 
#define MAXCODES   (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */
 
#define FIXLCODES   288 /* number of fixed literal/length codes */
 

Functions

static int bits (struct state *s, int need)
 
static int stored (struct state *s)
 
static int decode (struct state *s, const struct huffman *h)
 
static int construct (struct huffman *h, const short *length, int n)
 
static int codes (struct state *s, const struct huffman *lencode, const struct huffman *distcode)
 
static int fixed (struct state *s)
 
static int dynamic (struct state *s)
 
int puff (unsigned char *dest, unsigned long *destlen, const unsigned char *source, unsigned long *sourcelen)
 

Class Documentation

struct state

Definition at line 37 of file blast.c.

Collaboration diagram for state:
Collaboration graph
Class Members
int bitbuf
int bitcnt
jmp_buf env
int first
unsigned char * in
const unsigned char * in
unsigned long incnt
blast_in infun
void * inhow
unsigned long inlen
unsigned left
unsigned next
unsigned char out[4096]
unsigned char * out
unsigned long outcnt
blast_out outfun
void * outhow
unsigned long outlen
struct huffman

Definition at line 99 of file blast.c.

Collaboration diagram for huffman:
Collaboration graph
Class Members
short * count
short * symbol

Macro Definition Documentation

#define FIXLCODES   288 /* number of fixed literal/length codes */

Definition at line 95 of file puff.c.

#define local   static /* for local function definitions */

Definition at line 85 of file puff.c.

#define MAXBITS   15 /* maximum bits in a code */

Definition at line 91 of file puff.c.

#define MAXCODES   (MAXLCODES+MAXDCODES) /* maximum codes lengths to read */

Definition at line 94 of file puff.c.

#define MAXDCODES   30 /* maximum number of distance codes */

Definition at line 93 of file puff.c.

#define MAXLCODES   286 /* maximum number of literal/length codes */

Definition at line 92 of file puff.c.

Function Documentation

static int bits ( struct state s,
int  need 
)
static

Definition at line 126 of file puff.c.

static int codes ( struct state s,
const struct huffman lencode,
const struct huffman distcode 
)
static

Definition at line 436 of file puff.c.

static int construct ( struct huffman h,
const short *  length,
int  n 
)
static

Definition at line 340 of file puff.c.

static int decode ( struct state s,
const struct huffman h 
)
static

Definition at line 263 of file puff.c.

static int dynamic ( struct state s)
static

Definition at line 665 of file puff.c.

static int fixed ( struct state s)
static

Definition at line 536 of file puff.c.

int puff ( unsigned char *  dest,
unsigned long *  destlen,
const unsigned char *  source,
unsigned long *  sourcelen 
)

Definition at line 793 of file puff.c.

static int stored ( struct state s)
static

Definition at line 164 of file puff.c.