Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

src/huffman.c File Reference


Detailed Description

Implements the Huffman compression algorithm.

Uses a pre-generated symbol table (hufftable.h).

Definition in file huffman.c.

#include "crogue.h"
#include "hufftable.h"
#include "huffman.h"
#include "substdio.h"

Go to the source code of this file.

Functions

void fhuffmaninit_write (void)
void fhuffmanputc (unsigned char c, FILE *f)
void fhuffmanflush (FILE *f)
void fhuffmaninit_read (void)
char fhuffmangetc (FILE *f)

Variables

unsigned long _hp_pending = 0
unsigned short _hp_pending_length = 0
unsigned long _hg_pending = 0
unsigned short _hg_pending_length = 0


Function Documentation

void fhuffmanflush FILE *  f  ) 
 

Definition at line 59 of file huffman.c.

References _hp_pending, and _hp_pending_length.

Referenced by fhuffmanputc(), save_game(), and save_level().

char fhuffmangetc FILE *  f  ) 
 

Definition at line 81 of file huffman.c.

References _hg_pending, _hg_pending_length, huffdecompresstable_entry::binrep, huffdecompresstable_entry::binreplen, huffdecompresstable_entry::byterep, huffdecompresstable::entries, and huff_decompress.

Referenced by _rleread_huffman().

void fhuffmaninit_read void   ) 
 

Definition at line 75 of file huffman.c.

References _hg_pending, and _hg_pending_length.

Referenced by load_level(), and restore_game().

void fhuffmaninit_write void   ) 
 

Definition at line 40 of file huffman.c.

References _hp_pending, and _hp_pending_length.

Referenced by save_game(), and save_level().

void fhuffmanputc unsigned char  c,
FILE *  f
 

Definition at line 46 of file huffman.c.

References _hp_pending, _hp_pending_length, fhuffmanflush(), huff_compress, hufftable::rep, and hufftable::replen.

Referenced by save_game(), and save_level().


Variable Documentation

unsigned long _hg_pending = 0 [static]
 

Definition at line 72 of file huffman.c.

Referenced by fhuffmangetc(), and fhuffmaninit_read().

unsigned short _hg_pending_length = 0 [static]
 

Definition at line 73 of file huffman.c.

Referenced by fhuffmangetc(), and fhuffmaninit_read().

unsigned long _hp_pending = 0 [static]
 

Definition at line 37 of file huffman.c.

Referenced by fhuffmanflush(), fhuffmaninit_write(), and fhuffmanputc().

unsigned short _hp_pending_length = 0 [static]
 

Definition at line 38 of file huffman.c.

Referenced by fhuffmanflush(), fhuffmaninit_write(), and fhuffmanputc().


Generated on Thu May 20 13:12:12 2004 for CalcRogue by doxygen 1.3.6