/*
 * stacswlib.h - header file for the STAC software-based compression library
 *
 * @(#) $Id: stacswlib.h,v 1.2 1996/06/06 20:39:45 gary Exp $
 */

typedef struct StacContext_structure {
	uint32   State ;
	uint3264 CompHist;
	uint3264 DecompHist;
	uint16   CompOptions;
} StacContext_t ;

/*
 * Values for State field in StacContext structure
 */
#define	STAC_CONTEXT_USED			0x01
#define	STAC_CONTEXT_COMPRESS_FINISHED		0x02
#define	STAC_CONTEXT_DECOMPRESS_FINISHED	0x04

/*
 * Currently, we're guessing on these
 */
#define	STAC_PREPEND_MARGIN		32
#define	STAC_PERFORMANCE_PARAMETER	32

//#define	STAC_DECOMP_BUFFER_SIZE		1600
#define STAC_DECOMP_BUFFER_SIZE		(2048 - STAC_PREPEND_MARGIN)

/*
 * Functional prototypes
 */
uint3264 StacCompress() ;
uint3264 StacDecompress() ;
uint32 StacResetHistory() ;
uint32 stacFinishCompress() ;
uint32 stacFinishDecompress() ;
caddr_t StacGetNewContext() ;

/*
 * Macros
 */

/*
 * These three macros allow a user to quickly determine whether or not
 * a job has already been scheduled by the "staclib" library.
 *
 * Each macro requires a context handle as a parameter.
 */
#define	COMPRESS_JOB_PENDING(x)		(0)

#define	DECOMPRESS_JOB_PENDING(x)	(0)

#define	RESET_JOB_PENDING(x)		(0)

/*
 * These macros allow the user to turn the KeepHistory option on or off
 */
#define	STAC_KEEP_HISTORY_OFF(x) \
		((StacContext_t *) (x))->CompOptions &= ~(LZS_SAVE_HISTORY)
#define	STAC_KEEP_HISTORY_ON(x) \
		((StacContext_t *) (x))->CompOptions |= LZS_SAVE_HISTORY
