📄 compress.h
字号:
#include <vxWorks.h>
#define ZLIB_INTERNAL
#include <sdk/exlib/compress/zlib.h>
#ifndef _INCcompressh
#define _INCcompressh
/*##################################################################################
模块一,声明公用的宏和定义 */
#define CMP_BLOCK_FLAG 0xa1b2c3d4
#define CMP_DELAY_TICKS 5 /*delay 5 ticks every 8k data compressed*/
#define UNCMP_BLOCK_TIMES 250
#define UNCMP_DELAY_TICKS 5 /*every 250 block data compressed
have been uncpmressed,then delay 5 ticks*/
#define CMP_BLOCK_SIZE 0x2000 /*the data block size:8k every compress*/
#if defined (_REScompressh)
/*##################################################################################
模块二,声明compress.c专用的宏和定义 */
#else /* #if not defined (_REScompressh) */
#ifdef __cplusplus
extern "C" {
#endif
/*##################################################################################
模块三,声明由compress.c提供给其他C文件用的宏和定义*/
/*
extern int compress(unsigned char *u_source, unsigned long u_sourceLen, \
unsigned char *u_dest, unsigned long *w_destlen );
extern int uncompress(unsigned char *u_source, unsigned long u_sourceLen, \
unsigned char *u_dest, unsigned long *w_destlen);
int compress8k(unsigned char *u_pSrcBuf, unsigned long u_srcBufSize, \
unsigned char *v_pDstBuf, unsigned long *w_pDstBufSize);
unsigned long uncompress8k(unsigned char *u_pSrcBuf, unsigned long u_srcBufSize, \
unsigned char *v_pDstBuf, unsigned long *w_pDstBufSize);
int uncompress8k1(unsigned char *u_pSrcBuf, unsigned long u_srcBufSize, \
unsigned char *v_pDstBuf, unsigned long *w_pDstBufSize);
*/
extern int runCompress(unsigned char *u_pSrcBuf, unsigned long u_srcBufSize, \
unsigned char *v_pDstBuf, unsigned long *w_pDstBufSize);
extern long runUncompress(unsigned char *u_pSrcBuf, unsigned long u_srcBufSize, \
unsigned char *v_pDstBuf, unsigned long *w_pDstBufSize);
#ifdef __cplusplus
}
#endif
#endif /* #if defined (_REScompressh) */
#endif /*#ifndef _INCcompressh */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -