Copyright ã1995 by Netsurfer, Inc., All Rights Reserved.  

SurfGIFSupport.subproj/LWZDecoder 

Resource Collection 
Declared In:	SurfGIFSupport.subproj/LWZDecoder

Defined Types
 
SYNOPSIS 
	code_size	typedef struct __LWZState {	
			/*" state used by LWZReadByte "*/
			int code_size;

DESCRIPTION
	Lempel-Welch-Ziv decompression state (rather large). 

Symbolic Constants
 
SYNOPSIS 
	MAX_LWZ_BITS	12
	FALSE	NO
	TRUE	YES
	LWZ_NO_ERROR	0
	LWZ_DONE	-1
	LWZ_NO_EOD	-2
	LWZ_CIRCULAR_ERR	-3
	LWZ_BIT_OVERRUN	-4
	LWZ_DATA_BLOCK_ERR	-5

DESCRIPTION
	Maximum number of bits present in any single LWZ code. 

Functions
 
SYNOPSIS 
	void LWZInitState(id decoder, LWZState *state, unsigned char codeSize)

DESCRIPTION
	Initialize decompressor. 

SYNOPSIS 
	int LWZReadByte(id decoder, LWZState *state, NXStream *stream)

DESCRIPTION
	Decompress a single byte. 

SYNOPSIS 
	int GetDataBlock(id decoder, LWZState *state,NXStream *stream, unsigned char *buf)

DESCRIPTION
	Read a block of compressed image data 

SYNOPSIS 
	int GetCode(id decoder, LWZState *state, NXStream *stream)

DESCRIPTION
	Retrieve a single compression code.