For Programmers: Free Programming Magazines  


Home > Archive > Compression > April 2008 > zlib.dll









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author zlib.dll
herrmie@googlemail.com

2008-04-02, 3:59 am

Hello,

I use the zlib.dll to uncompress zip, tgz, and gz files. But now I
have a real big problem.
To uncompress gz files I use the function uncompress from the
zlib.dll. It works with tgz files very well, but when I want to
uncompress an gz file, it doesn't work. It writes 11 Bytes to the file
and the rest of the filesize of the compressed file is with 0 bytes. I
use for the uncompress of gz file also the uncompress function from
the zlib.dll. But Now I found, that there is another function called
gzgetc. Maybe I have to use this? But it is very strange that it works
with tgz files.
Maybe someone of you have a code sample to uncompress a gz file?

Thanks a lot

kind regards
herrmie
Mark Adler

2008-04-02, 7:03 pm

On Apr 2, 12:43=A0am, "herr...@googlemail.com" <herr...@googlemail.com>
wrote:
> To uncompress gz files I use the function uncompress from the
> zlib.dll. It works with tgz files very well, but when I want to
> uncompress an gz file, it doesn't work.


The uncompress() function in zlib does not work on gz or tgz files.
It only works on zlib files. You need to read zlib.h to know what all
the functions do so you can picks the right ones. You can use the gz*
functions to work directly on gz files, or the inflate* functions with
the proper options to work on gzip data in memory.

Even when you do use the correct functions to decompress gz files,
decompressing a tgz file results in a tar file, which you then have to
process further to extract the files within. zlib does not provide
tar extraction.

Mark

herrmie@googlemail.com

2008-04-03, 3:57 am

On 2 Apr., 15:23, Mark Adler <mad...@alumni.caltech.edu> wrote:
> On Apr 2, 12:43 am, "herr...@googlemail.com" <herr...@googlemail.com>
> wrote:
>
>
> The uncompress() function in zlib does not work on gz or tgz files.
> It only works on zlib files. You need to read zlib.h to know what all
> the functions do so you can picks the right ones. You can use the gz*
> functions to work directly on gz files, or the inflate* functions with
> the proper options to work on gzip data in memory.
>
> Even when you do use the correct functions to decompress gz files,
> decompressing a tgz file results in a tar file, which you then have to
> process further to extract the files within. zlib does not provide
> tar extraction.
>
> Mark



Good Morning Mark,

I use the uncompress function for tgz files and it works very well.
And I use also the uncompress function for gz files, but some files
can be decompressed and other files not. By the way, in the file,
which doesn't work are not the data I want, it's byte crap. Anyway, I
have a look on the gz* functions and maybe I will find a solution. :)

Thanks for helping.

kind regards
Steffen
Enshlolee62

2008-04-05, 2:49 pm

Thousands of MP3s are waiting for you at http://mp3files4free.com/

Our new hits:
"Julie London - I Left My Heart In San Francisco" free mp3 download
"HIM - The Sacrament (Acoustic Version) (Bonus Track)" free mp3 download
"Love Spirals Downwards - Write In Water" free mp3 download
"Jean Michel Jarre - La Cage" free mp3 download
"Petersen Quartett - 1. Presto" free mp3 download
"Blackhawk - There You Have It" free mp3 download
"Nasty Savage - Eromantic Vertigo" free mp3 download
"Burhan Ocal, Smadj, The Trakya - Opaz (Smadj MiX)" free mp3 download
"Christina Aguilera - Loving Me 4 Me" free mp3 download
"Ojos De Brujo - El Confort No Reconforta" free mp3 download
"Yoko Kanno - Cosmic Dare (Pretty with a pistol)" free mp3 download
"Glenn Miller - Here We Go Again" free mp3 download
"Capercaille - mMo Chailin Dileas Donn" free mp3 download
"Electronic - Various Artists - Mirda Rock (Technofunk)" free mp3 download
"Klubbheads - 112 - audiosweet - sunshine after the rain (dj bo...)" free mp3 download
"Indie - Various Artists - Our Last Days As Children (Explosions In The Sky)" free mp3 download
"Herbert Gronemeyer - Anna" free mp3 download
"Easy Listening - Various Artists - ALCHEMY (MITHOS)" free mp3 download
"Grupo Rodeio - AudioTrack 12" free mp3 download
"Ethnic - Various Artists - Truth No. 2" free mp3 download
"Dave Alvin - Dont Look Now" free mp3 download
"Pop - Various Artists - One (Tyrese)" free mp3 download
"Bernard Purdie - testifyin'" free mp3 download
"Eminem - It's Only fair to Warn Frees.." free mp3 download
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com