Click to download the standalone DLL
DLL internal Encapsulation API format
Gzipbool fnzlibdecompresspacket (__in_param unsigned char* gzlibdatabuffer, __in_param size_t gZLibDataLength,_ _out_param char* pchdatabuffer,__out_param DWORD *pdwlength); BOOL fnzlibcompresspacket (__in_param unsigned char* gzlibdatabuffer, __in_param size_t gzlibdatalength,__out_ PARAM char * pchgzipoutdata,__out_param DWORD *pdwlength);//zlibbool fngzipdecompresspacket (__in_param unsigned char* Gzipdatabuffer,__in_param size_t gzipdatabuffer_length, __out_param char* pchdatabuffer,__out_param DWORD *pdwLength) ; BOOL Fngzipcompresspacket (__in_param const char * gzipdatabuffer,__in_param int Gzipdatabuffer_length,__out_param Char * Dstdatabuffer, __out_param int *pdwlength);
Gzip Call Core Code Demo
typedef BOOL (*uncompressiongzippackettobuffer) (unsigned char* gzipdatabuffer, size_t gzipdatalength, char * pdatabuff Er,dword *dwlength); typedef BOOL (*compressionbufferpackettogzip) (unsigned char* chdatabuffer, size_t chdatalength, C har* Pgzipbuffer,dword *dwlength); HINSTANCE Hinst=null; Uncompressiongzippackettobuffer Ungzippacket; Compressionbufferpackettogzip Comgzipbuffer; Hinst=loadlibrary (_t ("GzipZlibdll.dll")); if (hinst==null) {return-1;} ungzippacket= (Uncompressiongzippackettobuffer) GetProcAddress (HInst, "Fngzipdecompresspacket"); Comgzipbuffer= (Compressionbufferpackettogzip) GetProcAddress (HInst, "Fngzipcompresspacket"); if (ungzippacket==null) {return-1;} if (comgzipbuffer==null) {return-1; } BOOL Bret=ungzippacket ((unsigned char*) pchgzipbuff,dwreaded,pchdatabuff,&dwtransfersize);// Note that the dwgzipsize must have a value here, cannot pass 0 considering compression must be smaller than the original data. Transfer dwtransfersize size can be bool Breturn=comgzipbuffer ((unsigned char*) PCHDATABUFF,DWTRANSFERSIZE,PCHGZIPBUff,&dwgzipsize); FreeLibrary (HInst);
Zlib Demo example.
HTTP data content in Web Service interaction gzip,zlib format compression and decompression encapsulation (shared)