PROCEDURE init LOCAL lcPath lcPath = ADDBS(JUSTPATH(this.ClassLibrary)) Declare integer compress in (lcPath+"zlib.dll") ; string @ dest, integer @ destLen, string @ src, integer srcLen Declare integer compress2 in (lcPath+"zlib.dll") ; string @ dest, integer @ destLen, string @ src, integer srcLen, integer nLevel Declare integer uncompress in (lcPath+"zlib.dll") ; string @ dest, integer @ destLen, string @ src, integer srcLen ENDPROC PROCEDURE destroy CLEAR DLLS 'compress', 'uncompress' ENDPROC procedure CompressString LPARAMETERS tcString #define ZLIB_NOERROR 0 this.nOriginalSize = Len(tcString) lnDestLen = CEILING(this.nOriginalSize * 1.02 + 12) lcBuffer = REPLICATE(CHR(0), lnDestLen) lnResult = compress2(@lcBuffer, @lnDestLen, @tcString, Len(tcString),9) If lnResult = ZLIB_NOERROR Then this.cCompressed = Left(lcBuffer, lnDestLen) this.nCompressedSize = lnDestLen ELSE this.nCompressedSize = 0 EndIf RETURN (lnResult = ZLIB_NOERROR) EndProcCetin