Dear developer of PalmZLib,
I am having trouble using the PalmZLib shared library
that I donwloaded from
http://palmzlib.sourceforge.net/. Here is some
background:
I built a windows Cygwin tool from the ZLib sources
(from zlib home), and use it to compress binary data
(windowBits=10;memLevel=6;strategy=default) using
Lz77. I then package the compressed file as a
resource of a .prc database, and HotSync it to the
handheld that is running PalmOS v3.5 (Handspring
Visor). On the handheld, I open PalmZLib and envoke
PalmZLib's ZLibuncompress function. For some reason,
I always get the Z_BUF_ERROR error code back from this
function, even though I pass in a much larger
destination buffer than the expected uncompressed
output. For example, I compressed a 2000 byte file
down to 906 bytes using my Cygwin tool. When calling
ZLibuncompress, I passed it a destination buffer of
16000 bytes and a source buffer of 906 bytes, and
still got Z_BUF_ERROR. Do you have any suggestions?
What is a good strategy for debugging this problem?
Thank you,
Vitaly Kruglikov
vkruglikov@handspring.com
Logged In: YES
user_id=435583
Had the same problem but when I copied and pasted the
uncompress function in my progect and had it use
infalteInit and etc. from SysZLib it worked just purfect.
Does Someone have a suggestion???
Regards
Dmytro Semenov
Logged In: YES
user_id=435583
Had the same problem but when I copied and pasted the
uncompress function in my progect and had it use
infalteInit and etc. from SysZLib it worked just purfect.
Does Someone have a suggestion???
Regards
Dmytro Semenov
Logged In: NO
I figured out what the problem is: The implementation of
ZLibuncompress in PalmZLib is missing the PalmOS library-
specific library reference number as its first argument.
Since the prototype for ZLibuncompress defines an extra
first argument (for the library refNum), but the
implementaiton does not, you get a mismatch of arguments.
The solution is to add the refNum argument to the
implemantation to match the prototype.
Logged In: NO
I figured out what the problem is: The implementation of
ZLibuncompress in PalmZLib is missing the PalmOS library-
specific library reference number as its first argument.
Since the prototype for ZLibuncompress defines an extra
first argument (for the library refNum), but the
implementaiton does not, you get a mismatch of arguments.
The solution is to add the refNum argument to the
implemantation to match the prototype.