Menu

#1 PalmZLib invlate problem

open
nobody
None
5
2001-02-27
2001-02-27
Anonymous
No

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

Discussion

  • Semenov

    Semenov - 2002-01-23

    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

     
  • Semenov

    Semenov - 2002-01-23

    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

     
  • Nobody/Anonymous

    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.

     
  • Nobody/Anonymous

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.