⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grab.c

📁 采用zlib标准的压缩源码
💻 C
字号:
#include"zlib.h"#include"Grab.h" typedef void * LPVOID; typedef unsigned char BYTE; typedef  BYTE *LPBYTE; typedef  unsigned long int DWORD;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.*/ {   return  compress2 (DestBuffer,dwBufLenout,lpBuffer, lsbufflen,leve);}/*Decompresses the source buffer into the destination buffer*/ 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              */                                                 {   return  uncompress (lDestpBuffer,   dwBufLen, GrabBuffer, lsbufflen);}    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -