Menu

#25 PalmZlib function problem

open
nobody
None
5
2002-05-17
2002-05-17
Anonymous
No

Hi,
When use codewarrior to call palmzlib library function
compress2() and uncompress(), it always fails and
returns 5 (BAD_MEMORY), even though using deflate()
and inflate() can get the correct result on same data.
Code snippet is as follows:
...
ZLSetup;
int err = 0;
Bytef d[500];
Bytef s[50];
s[0]=0x46;
s[1]=0x4c;
s[2]=0x4a;
s[3]=0x4c;
s[4]=02;
s[5]=0;
uLongf dc= 500;
uLongf sc = 6;
int i= ZLibcompress2(ZLibRef, d, &dc, s, sc,-1);
ZLTeardown;
...

Discussion


Log in to post a comment.

MongoDB Logo MongoDB