Zlib uncompression for an idiot?

Discussion in 'Software' started by Jgke, Sep 25, 2010.

Thread Status:
Not open for further replies.
  1. Jgke

    Jgke Private E-2

    I want to uncompress a ZLIB-compressed file, without any programming skill. Could some of you give me exact help?
     
  2. The Shadow

    The Shadow Specialist

    Ok, I'm going to ask you a really dumb question. OK?

    Have you gone to their web site? Try that first.
    http://www.zlib.net/

    Without a lot of digging, I don't know if standard compression programs like WinRar or 7Zip would unzip that file or not.
    At WinRar, they like for you to BUY their software, but 7Zip is FREE.

    I like both of those and have them both installed on my PC, and I use one or the other almost daily.

    WinRar for instance, adds lines to your Right Click context menu where you can right click on a compressed file and then just click "Extract Here" or some such. I love its simplicity.;)

    Good Luck to you!:wave

    The Shadow :cool
     
  3. Jgke

    Jgke Private E-2

    I didn't say that I want to get the ZLIB source, I want to uncompress a ZLIB-compressed file.
     
  4. The Shadow

    The Shadow Specialist

    And if you get the program that creates ZLIB files, that's what you will need to UN-Compress them. Eh?

    Or try the other programs I referenced to you.
     
  5. PC-XT

    PC-XT Master Sergeant

    zlib is essentially the same as zip. You could try giving it a .zip extension, and see if you can unzip it. I know that works with .jar files, which use zlib. If that doesn't work, you should be able to right-click an empty space and choose Undo rename, but I often like to make backups just in case.
     
  6. Jgke

    Jgke Private E-2

    Shadow, I think you are trying to guide me on a thing that you don't understand yourself. ZLIB isn't a program, it's a software library.

    Doesn't work.
     
  7. PC-XT

    PC-XT Master Sergeant

  8. Jgke

    Jgke Private E-2

  9. PC-XT

    PC-XT Master Sergeant

  10. Jgke

    Jgke Private E-2

    The only software that seemed worthwhile couldn't be downloaded.
     
  11. PC-XT

    PC-XT Master Sergeant

    Zlib.dll is for use with both gzip and zlib wrappers for raw deflate code, but while I can find programs that handle gzip, it seems to be hard to find zlib ones, other than for png and zbm images. If I get time, maybe I can make a simple zlib command line or drag and drop decompress program. I'll have to look into it.
     
  12. PC-XT

    PC-XT Master Sergeant

    Ok. I've attached the executable I wrote rather quickly to perform zlib decompression, zdrop.exe, in a zip archive. I tested it with level 2 zlib files I made from a zlib library example. I have read that some zlib files may be from a modified zlib library, and so can't be decompressed by standard zlib, though I assume a zlib extension on the file means that is not likely.

    To Compress a File:
    You may compress any file, other than a zlib file, with normal compression (level 2).
    Windows Drag and Drop Mode: drag any file's icon, other than a zlib archive, onto the zdrop icon
    Console Command: zdrop filename
    This makes a zlib archive named filename.zlib.
    You can only compress one file at a time in this version. Others are ignored.

    To Decompress a Zlib Archive:
    Files with a .zlib extension are decompressed automatically without needing any switch. The new file has the .zlib extension removed from the name.
    Windows Drag and Drop Mode: drag any zlib archive onto the zdrop icon
    Console Command: zdrop filename.zlib
    This makes a file named filename. If the file doesn't end with .zlib, it will be recompressed with a .zlib extension added. This file would need decompressing twice, instead of just once. (If you try this, you should add another .zlib extension afterwards for each compression, so it ends .zlib.zlib etc. to require the correct amount of decompressions, though it's better to use high level 3 in another program if you just need more compression.)
    You can only decompress one archive at a time. Others are ignored.

    Other info:
    I'd recommend that you put this file in the folder with your zlib files for easy access. For Drag and Drop mode, you could alternatively put it on the desktop, if you use it enough. For console mode, you would want it in your PATH if not in the same directory as your zlib files.

    If a file already exists with a name it is trying to use, the program should fail with a message to rename or delete that file. Unfortunately, it doesn't show long enough to be read in drag and drop mode. :( I might work on that later, but figured I'd go ahead and publish it this way, since I might not have the time to change it for awhile. Other errors will give an empty file and another message that doesn't stay except in console mode.

    Zlib.dll or zlib1.dll are not required. I built this statically, using zlib-1.2.5, so everything needed is included in this one file. [other than stuff like msvcrt.dll, which the system provides]

    I tested this from XP back to Win98. It worked, with a couple quirky bugs in drag and drop mode:

    1. In drag and drop mode, messages don't stay on the screen, but close automatically once the process is done. If you need to see an error message, you need to use the console mode.

    2. In some old versions of Windows, file names become corrupted in drag and drop mode, since Windows gives the shortened DOS name instead of the Windows one. This means archives can't be decompressed, but files can still be compressed, though you may need to rename the archive afterward. Optionally, you can use the console mode.

    I haven't found an easy solution for these, yet, though I played with a batch file and its properties with some good results, ending up with 3 files. It didn't always work on all the test systems, and sometimes introduced bug#2 to XP, so I didn't include it here.


    I wouldn't risk my account here by uploading known harmful or very bad stuff, but for the sake of clarity, I'm including the following:
    Legal stuff: Any use of this software is AS IS. I haven't tested it all that much, and can't guarantee that it will work. I accept no liability whatsoever. I provide no warranty of any kind.
    I used the functions from the public domain zpipe by Mark Adler, but rewrote main() to use file functions with no command switches. Anyone may download this from here as freeware. If it's popular, I might try to fix it up better, later. ;)

    I hope it works. :)
     
  13. PC-XT

    PC-XT Master Sergeant

    I found an error in that one, so I deleted it before someone downloaded it. This one should work. Sorry to keep posting. :( This should be my last.

    This still has the 2 bugs listed above, though.
     

    Attached Files:

    95Shade and thevoiceover like this.
  14. Jgke

    Jgke Private E-2

    Well, didn't work. Thanks for trying anyway... I quess I'll have to ask on an another place I know...
     
  15. PC-XT

    PC-XT Master Sergeant

    I could try to make it display the message better, so we have a better idea of what's wrong. I probably won't have time to do that until next week, though. I'll probably end up just adding a Press Enter thing at the end, though I find that solution to be annoying. lol
     
  16. Jgke

    Jgke Private E-2

    Nah, don't bother.
     
  17. aaaaaa

    aaaaaa Private E-2

    hey, that was just what i needed, thanks!
     
    95Shade likes this.
  18. PC-XT

    PC-XT Master Sergeant

    Follow up:
    I found that IP Tools by Erwan's Lab contains a zlib compressor/decompressor in the menu under Tools > System > Compress (zlib) along with a whole suite of other tools in many menus.
    It uses .z as the extension, while mine uses .zlib. You can rename .z files to end with .zlib if you just want to use mine, or select "Tous les fichiers (*.*)" in IP Tools' open dialog to choose a .zlib for the DeCompress IN box. (I hope they fixed that translation in the new version. :p) I'm sure I could make mine able to use both .z and .zlib sometime, too.
     
  19. PC-XT

    PC-XT Master Sergeant

  20. PC-XT

    PC-XT Master Sergeant

    NVM
    The .z format that these programs open is different from zlib. My tool here and iptools are the only ones that I found to open zlib files.
     
  21. thugzbaby

    thugzbaby Private E-2

    Just wanted to say thanks for this file, it's what I was looking for also, and it works perfectly on my zlib compressed files
     
  22. starkhorses3049

    starkhorses3049 Private E-2

    That zdrop exe you posted was perfect. We have files zipped by C1ZStreamReader ( C1Zip ) from ComponentOne, a proprietary implementation of the zlib library i suspect. Was going to be totally stuck without it. Thanks!!
     
  23. Endermore

    Endermore Private E-2

    Thank you PC-XT for zdrop.exe!!! I will be using this often so if you need the numbers to sway you towards keeping this update, please put me on that list!
     
  24. PC-XT

    PC-XT Master Sergeant

    This is an update to zlib-1.2.8.

    I also refined the code, fixed a small bug that caused a crash when it was given the wrong file name (a file that didn't exist) or possibly when it couldn't create a file for some reason, and added support for the .z extension that IP Tools gives to zlib files. (As I said above, .z is actually a similar, but incompatible, compression system for UNIX, so most other .z files can't be decompressed by this tool.)

    The Windows bugs are still in this version. (The console doesn't stay onscreen long enough to read error messages and old versions of windows may use short filenames.)

    The following ERRORLEVEL table shows the return value for batch file or shell calls in this version of zdrop. It is based on zlib error codes:
    0 success
    -1 file read/write error
    -3 zlib file is wrong format or corrupt (destination file truncated)
    -4 out of memory
    -5 buffer error
    -10 invalid parameters
    -12 destination file already exists
     

    Attached Files:

    Last edited: Oct 5, 2014
  25. hydrox467

    hydrox467 Private E-2

    Sorry to beat a dead horse... any chance you want to post the source code for this ?

    Thanks so much, this worked wonderfully!
     
  26. Eldon

    Eldon Major Geek Extraordinaire

    You're replying to a thread from 2010.
    If you need help, start a new thread.
     
Thread Status:
Not open for further replies.

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds