plan 9 kernel history: overview | file list | diff list

1999/1007/port/thwack.h (diff list | history)

1999/1001/sys/src/9/port/thwack.h:12,221999/1007/sys/src/9/port/thwack.h:12,27 (short | long | prev | next)
Remove MaxLen. Add MaxFastLen, BigLen*, Max*Decode. Change Thwack.slot to int. Remove Unthwack bit buffer.
rsc Fri Mar 4 12:44:25 2005
1999/1001    
	HashSize	= 1<<HashLog, 
	HashMask	= HashSize - 1, 
 
	MaxLen		= 8, 
1999/1007    
	MaxFastLen	= 9, 
	BigLenCode	= 0xf4,		/* minimum code for large lenth encoding */ 
	BigLenBase	= 4,		/* starting items to encode for big lens */ 
	BigLenBits	= 8, 
1999/1001    
	MaxOff		= 8, 
	OffBase		= 6, 
 
	MinDecode	= 9,		/* minimum bits to decode a match or lit */ 
1999/1007    
	MaxOffDecode	= 4 + MaxOff + OffBase - 1, 
	MaxLenDecode	= 16, 
1999/1001    
 
	EWinBlocks	= 32,		/* blocks held in encoder window */ 
	DWinBlocks	= 32,		/* blocks held in decoder window */ 
1999/1001/sys/src/9/port/thwack.h:44,501999/1007/sys/src/9/port/thwack.h:49,55
1999/1001    
	uchar		*dst;		/* output buffer */ 
	uchar		*dmax; 
 
	ulong		slot;		/* next block to use */ 
1999/1007    
	int		slot;		/* next block to use */ 
1999/1001    
	ThwBlock	blocks[EWinBlocks]; 
	ushort		hash[EWinBlocks][HashSize]; 
	uchar		data[EWinBlocks][ThwMaxBlock]; 
1999/1001/sys/src/9/port/thwack.h:59,691999/1007/sys/src/9/port/thwack.h:64,69
1999/1001    
 
struct Unthwack 
{ 
	ulong		nbits;		/* input bit buffer */ 
	ulong		bits; 
	uchar		*src;		/* input buffer */ 
	uchar		*smax; 
                 
	int		slot;		/* next block to use */ 
	UnthwBlock	blocks[DWinBlocks]; 
	uchar		data[DWinBlocks][ThwMaxBlock]; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)