Whenever I try to compress a block with ZLibcompress2, the reported
error is -5 (Z_BUF_ERROR). I correctly find, load and open the library, the
reference number is setting to the appropriate value, but the result is
always -5 on both compress and decompress. What may I be wrong ? The code
is:

//initialization
  ZLibRef = sysInvalidRefNum;

  if (errNone != SysLibFind("Z.Lib", &ZLibRef))
  {
       SysLibLoad('libr', 'ZLib', &ZLibRef);
  }
  if (ZLibRef != sysInvalidRefNum)
  {
   if (mlErrNone != ZLibOpen(ZLibRef))
   {
        ZLibRef= sysInvalidRefNum;
   }
  }

//use - a simple example
   BYTE src[100];
   BYTE dest[300];
   unsigned long size=300;
   int er=ZLibcompress2(ZLibRef,dest,&size,src,100,6);




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to