📄 grab.h
字号:
/*
*2006-02-27 hall
*The Grab and unGrab
* /
/************************************************************************
//ZEXTERNint Grab(uchr *DestBuffer, /* out: Destination buffer */
// ulong *dwBufLenout, /* out: length of output from Grab */
// uchar *lpBuffer, /* in: Source Buffer */
// ulong *lsbufflen, /* in: length of input Buffer */
// uchar leve
// );
//
/*
Compresses the source buffer into the destination buffer. The level
parameter has the same meaning as in deflateInit. sourceLen is the byte
length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least 0.1% larger than sourceLen plus
12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
Grab returns 0 if success, -4 if there was not enough
memory, -5 if there was not enough room in the output buffer,
-2 if the level parameter is invalid.
*********************************************************************/
//ZEXTERN int unGrab(uchar *lDestpBuffer, /* out: Destination buffer */
// ulong *dwBufLen, /* (in/out) in:length memset Buffer
// out: length of output from Grab */
// uchar *GrabBuffer, /* in: Source Buffer */
// ulong *lsbufflen /* in: length of input Buffer */
// );
/*
ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
Decompresses the source buffer into the destination buffer. sourceLen is
the byte length of the source buffer. Upon entry, destLen is the total
size of the destination buffer, which must be large enough to hold the
entire uncompressed data. (The size of the uncompressed data must have
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
This function can be used to decompress a whole file at once if the
input file is mmap'ed.
uncompress returns 0 if success, -4 if there was not
enough memory, -5 if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
************************************************************************/
#ifndef _GRAB_H
#define _GRAB_H
#define Z_DEFAULT_COMPRESSION (-1)
/*Compresses the source buffer into the destination buffer*/
extern int Grab(unsigned char *DestBuffer, /* out: Destination buffer */
unsigned long *dwBufLenout, /* out: length of output from Grab */
unsigned char *lpBuffer, /* in: Source Buffer */
unsigned long lsbufflen, /* in: length of input Buffer */
int leve );
/* The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
1 gives best speed, 9 gives best compression, 0 gives no compression at
all (the input data is simply copied a block at a time).
Grab returns 0 if success, -4 if there was not enough memory, -5 if there
was not enough room in the output buffer, -2 if the level parameter is invalid.
*/
/*Decompresses the source buffer into the destination buffer*/
extern int unGrab(unsigned char *lDestpBuffer, /* out: Destination buffer */
unsigned long *dwBufLen, /* (in/out) in:length memset Buffer
out: length of output from Grab */
unsigned char *GrabBuffer, /* in: Source Buffer */
unsigned long lsbufflen ) ; /* in: length of input Buffer */
#endif //_GRAB_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -