www.ShoppingPodder.com

Leading Computer Shopping,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

Building zpipe.c on windows: strange ZIP format that cannot
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer Compression  
View previous topic :: View next topic  
Author Message
Andreas Eibach
Guest






PostPosted: Sun Nov 09, 2008 7:21 am    Post subject: Building zpipe.c on windows: strange ZIP format that cannot Reply with quote

Hi there,

I'm unable to unpack ZIP files on Windows with common archiver software
which are packed
with the zpipe.c sample tool . How comes?
I've built it under MingW/MSYS and it worked well, however the -lzdll
needs to be the last of the gcc line and must not come before the -o.
This took me _hours_ to figure out what the problem for the "undefined
references" is, since I assumed my installation to be OK.

When using
zpipe < mytest.fil > blah.zip
I can read the data of mytest.fil again by
zpipe -d < blah.zip

BUT I cannot unpack blah.zip using WinRAR or other tools. Why that?
How do I have to modify zpipe.c so that I can unpack the ZIP files with
common software?
(My first aim is to compile zlib support into my own application, which I'm
possibly planning to set under GPL#2. However, I cannot use 'alien' ZIP-like
formats because my decompression routines [using zlib1.dll] must also be
able to unpack archives which were created by third-party tools.
So what can I do?

Best Regards,
Andreas
Back to top
Klaus Stengel
Guest






PostPosted: Sun Nov 09, 2008 3:40 pm    Post subject: Re: Building zpipe.c on windows: strange ZIP format that can Reply with quote

Hi,

Andreas Eibach wrote:
Quote:
When using
zpipe < mytest.fil > blah.zip
I can read the data of mytest.fil again by
zpipe -d < blah.zip

BUT I cannot unpack blah.zip using WinRAR or other tools. Why that?
How do I have to modify zpipe.c so that I can unpack the ZIP files
with common software?

I think you misunderstood the purpose of the zpipe program. It just
applies the deflate compression algorithm to the given data stream and
nothing else. However, the ZIP file format (which you probably want) is
specified as a container for multiple files and codings and also
maintains information about the stored files, e.g. their names,
attributes, size. Data inside the archive is often compressed with
deflate, but it's also possible to use bzip2 and some other algorithms
in recent versions. Most common tools don't know how to handle 'raw'
streams as created by zpipe and only expect them inside some archive
format like ZIP.

Examples for reading/writing ZIP files are included in the zlib
distribution inside the contrib/minizip directory.

Quote:
(My first aim is to compile zlib support into my own application,
which I'm possibly planning to set under GPL#2. However, I cannot use
'alien' ZIP-like formats because my decompression routines [using
zlib1.dll] must also be able to unpack archives which were created by
third-party tools. So what can I do?

Depending on the purpose of your application, you may want to use
a more complete and robust implementation than minizip. For
example, http://www.info-zip.org/ is mentioned on the zlib website and
you can find some more libraries/programs on
http://www.compression-links.info/Zip too.

Regards,
Klaus
Back to top
Display posts from previous:   
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer Compression  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum