Consulting

Results 1 to 4 of 4

Thread: uncompress a (zlib-compressed) string using ZLib in VBA

  1. #1

    uncompress a (zlib-compressed) string using ZLib in VBA

    Hi all - been knocking myself silly with this.

    I have a string of info (looks like hex?) that zlib was used to compress. I have that string, and simply want to de/uncompress it.

    They all look like (with my added spaces for clarity):

    000015a4 789c d59........
    00001085 789c d597c16.......
    00032fe4 789c ed7d5b......

    and continue for a long time like that. But they all have the 8 digits followed by 789c - meaning zlib was used (and the 8 digits are some encoded form of original size..?)

    I've used every little dll I could find -> zlib.dll, zlib1.dll, zlibwapi.dll, etc etc. None of them seem to work.

    All i want to do is to put the string in cell A1, and in cell A2, say =uncompress(A1) and have it work.

    Any help please? Killin myself here!

  2. #2
    VBAX Contributor
    Joined
    May 2010
    Location
    Sydney, NSW, Australia
    Posts
    170
    Location
    The only thing I managed to find was this:

    http://www.freevbcode.com/ShowCode.asp?ID=966

    It's built for VB5 and 6 so porting to VBA should be simple.

    Cheers

    Dan

  3. #3
    Quote Originally Posted by Blade Hunter
    The only thing I managed to find was this:

    link

    It's built for VB5 and 6 so porting to VBA should be simple.

    Cheers

    Dan
    Hm, I actually haven't come across that somehow in my long search. However, it still doesn't work. Even when I use their Compress function and then immediately uncompress a random string, I get a VALUE error...

  4. #4
    VBAX Contributor
    Joined
    May 2010
    Location
    Sydney, NSW, Australia
    Posts
    170
    Location
    Quote Originally Posted by Flipperbw
    Hm, I actually haven't come across that somehow in my long search. However, it still doesn't work. Even when I use their Compress function and then immediately uncompress a random string, I get a VALUE error...
    Post the code that is giving you the issue and I will check it out (Saves me recoding what you have already done ).

    Cheers

    Dan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •